Provides basic zip file functionality to JDWordpress.
More...
|
| | __construct (ComponentCollection $collection, $settings=array()) |
| | Constructor. More...
|
| |
| | __get ($function) |
| | Implements a built-in zip function. More...
|
| |
| | addByContent ($localFile, $contents) |
| | Adds to an open zip file via contents. More...
|
| |
| | addDirectory ($directory, $as) |
| | Adds entire directory to an open zip file. More...
|
| |
| | addFile ($file, $localFile=null) |
| | Adds to a zip file. More...
|
| |
| | begin ($path= '', $overwrite=true) |
| | Starts a access to a zip file. More...
|
| |
| | close () |
| | Closes a zip file. More...
|
| |
| | comment ($mixed= 'archive', $comment) |
| | Adds a comment to open zip file. More...
|
| |
| | delete ($mixed) |
| | Deletes an entry in an open zip file. More...
|
| |
| | end () |
| | Closes a zip file. More...
|
| |
| | extract ($location, $entries=null) |
| | Extracts from a zip file. More...
|
| |
| | find ($mixed, $options=0) |
| | Finds an entry in an open zip file. More...
|
| |
| | rename ($old, $new=null) |
| | Renames an entry in the zip file. More...
|
| |
| | stats ($mixed) |
| | Retrieves statistics from an open zip file. More...
|
| |
| | undo ($mixed= '*') |
| | Undo changes to an archive by index(int), name(string), or all ('all' | '*' | blank) More...
|
| |
| | unzip ($location, $entries=null) |
| | Extracts from a zip file. More...
|
| |
Provides basic zip file functionality to JDWordpress.
| __construct |
( |
ComponentCollection |
$collection, |
|
|
|
$settings = array() |
|
) |
| |
Constructor.
- Parameters
-
| ComponentCollection | $collection | Inherited from super. |
| array | $settings | Inherited from super. |
Implements a built-in zip function.
- Parameters
-
| mixed | $function | The function to call. |
- Returns
- mixed.
| addFile |
( |
|
$file, |
|
|
|
$localFile = null |
|
) |
| |
Adds to a zip file.
- Parameters
-
| mixed | $file | file to be included (full path). |
| mixed | $localFile | name of file in zip, if different. |
- Returns
- boolean
| begin |
( |
|
$path = '', |
|
|
|
$overwrite = true |
|
) |
| |
Starts a access to a zip file.
- Parameters
-
| mixed | $path | Local path for zip. |
| boolean | $overwrite | Overwrite existing file if present? |
- Returns
- boolean
Closes a zip file.
- Returns
- boolean
Closes a zip file.
Synonym for close.
- Returns
- boolean
| addByContent |
( |
|
$localFile, |
|
|
|
$contents |
|
) |
| |
Adds to an open zip file via contents.
Usage:
`$this->Zip->addByContents('myTextFile.txt', 'Test text file');`
- Parameters
-
| mixed | $localFile | Local path for zip. |
| mixed | $contents | Overwrite existing file if present? |
- Returns
- boolean
| addDirectory |
( |
|
$directory, |
|
|
|
$as |
|
) |
| |
Adds entire directory to an open zip file.
- Parameters
-
- Returns
- boolean
Undo changes to an archive by index(int), name(string), or all ('all' | '*' | blank)
Usage:
$this->Zip->undo(1); $this->Zip->undo('myText.txt'); $this->Zip->undo('*'); $this->Zip->undo('myText.txt, myText1.txt'); $this->Zip->undo(array(1, 'myText.txt'));
- Parameters
-
- Returns
- boolean
| rename |
( |
|
$old, |
|
|
|
$new = null |
|
) |
| |
Renames an entry in the zip file.
- Parameters
-
- Returns
- boolean
| find |
( |
|
$mixed, |
|
|
|
$options = 0 |
|
) |
| |
Finds an entry in an open zip file.
- Parameters
-
| mixed | $mixed | |
| mixed | $options | FL_NODIR, FL_NOCASE |
- Returns
- mixed index, name, or false
Deletes an entry in an open zip file.
- Parameters
-
| mixed | $mixed | delete by index(int), name(string), all ('all' | '*' | blank) |
- Returns
- boolean
| comment |
( |
|
$mixed = 'archive', |
|
|
|
$comment |
|
) |
| |
Adds a comment to open zip file.
- Parameters
-
| mixed | $mixed | comment by index(int), name(string), all ('all' | '*' | blank) |
| mixed | $comment | |
- Returns
- boolean
Retrieves statistics from an open zip file.
- Parameters
-
| mixed | $mixed | index(int) or name(string) |
- Returns
- mixed stat
| extract |
( |
|
$location, |
|
|
|
$entries = null |
|
) |
| |
Extracts from a zip file.
- Parameters
-
| mixed | $location | Output location |
| mixed | $entries | index(int) or name(string) |
- Returns
- mixed stat
| unzip |
( |
|
$location, |
|
|
|
$entries = null |
|
) |
| |
Extracts from a zip file.
- Parameters
-
| mixed | $location | Output location |
| mixed | $entries | index(int) or name(string) |
The documentation for this class was generated from the following file: