diff options
Diffstat (limited to 'user_guide_src/source/libraries/zip.rst')
-rw-r--r-- | user_guide_src/source/libraries/zip.rst | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/user_guide_src/source/libraries/zip.rst b/user_guide_src/source/libraries/zip.rst index ce70e6c88..816f49ca1 100644 --- a/user_guide_src/source/libraries/zip.rst +++ b/user_guide_src/source/libraries/zip.rst @@ -51,7 +51,7 @@ your server, and download it to your desktop. Class Reference *************** -.. class:: CI_Zip +.. php:class:: CI_Zip .. attribute:: $compression_level = 2 @@ -61,7 +61,7 @@ Class Reference $this->zip->compression_level = 0; - .. method:: add_data($filepath[, $data = NULL]) + .. php:method:: add_data($filepath[, $data = NULL]) :param mixed $filepath: A single file path or an array of file => data pairs :param array $data: File contents (ignored if $filepath is an array) @@ -100,7 +100,7 @@ Class Reference The above example will place my_bio.txt inside a folder called personal. - .. method:: add_dir($directory) + .. php:method:: add_dir($directory) :param mixed $directory: Directory name string or an array of multiple directories :rtype: void @@ -111,7 +111,7 @@ Class Reference $this->zip->add_dir('myfolder'); // Creates a directory called "myfolder" - .. method:: read_file($path[, $archive_filepath = FALSE]) + .. php:method:: read_file($path[, $archive_filepath = FALSE]) :param string $path: Path to file :param mixed $archive_filepath: New file name/path (string) or (boolean) whether to maintain the original filepath @@ -150,7 +150,7 @@ Class Reference // Download ZIP archive containing /new/path/some_photo.jpg $this->zip->download('my_archive.zip'); - .. method:: read_dir($path[, $preserve_filepath = TRUE[, $root_path = NULL]]) + .. php:method:: read_dir($path[, $preserve_filepath = TRUE[, $root_path = NULL]]) :param string $path: Path to directory :param bool $preserve_filepath: Whether to maintain the original path @@ -180,7 +180,7 @@ Class Reference This will create a ZIP with a directory named "directory" inside, then all sub-directories stored correctly inside that, but will not include the */path/to/your* part of the path. - .. method:: archive($filepath) + .. php:method:: archive($filepath) :param string $filepath: Path to target zip archive :returns: TRUE on success, FALSE on failure @@ -192,7 +192,7 @@ Class Reference $this->zip->archive('/path/to/folder/myarchive.zip'); // Creates a file named myarchive.zip - .. method:: download($filename = 'backup.zip') + .. php:method:: download($filename = 'backup.zip') :param string $filename: Archive file name :rtype: void @@ -206,7 +206,7 @@ Class Reference this method since it sends various server headers that cause the download to happen and the file to be treated as binary. - .. method:: get_zip() + .. php:method:: get_zip() :returns: Zip file content :rtype: string @@ -221,7 +221,7 @@ Class Reference $zip_file = $this->zip->get_zip(); - .. method:: clear_data() + .. php:method:: clear_data() :rtype: void |