
Public Member Functions | |
| isAvailable () | |
| Tests if the handler's zip functions are available or not. | |
| createZip (spunQ_Folder $folder, $archiveName, array $fileNodes) | |
| Creates a zipfile. | |
| extract (spunQ_ArchiveFile $file, spunQ_Folder $folder) | |
| Extracts the contents of an archive into given folder. | |
Static Public Member Functions | |
| static | getInstance () |
| Retrieves Singleton instance. | |
| static | setHandler (spunQ_ZipHandler $handler) |
| Sets the zip handler. | |
Private Member Functions | |
| addNodeToZipRecursive ($node, $zipArchive, $toBeArchived) | |
| Recursively adds a directory to a zip archive. | |
Static Private Attributes | |
| static | $instance = NULL |
| Singleton instance. | |
Definition at line 14 of file PhpZipHandler.class.php.
| spunQ_PhpZipHandler::addNodeToZipRecursive | ( | $ | node, | |
| $ | zipArchive, | |||
| $ | toBeArchived | |||
| ) | [private] |
Recursively adds a directory to a zip archive.
| $node | A spunQ_FileNode to be added to the zip archive (the point where we are on this call) | |
| $zipArchive | A php ZipArchive | |
| $toBeArchived | The spunQ_Folder where we are adding files or directories |
Definition at line 79 of file PhpZipHandler.class.php.
| spunQ_PhpZipHandler::createZip | ( | spunQ_Folder $ | folder, | |
| $ | archiveName, | |||
| array $ | fileNodes | |||
| ) |
Creates a zipfile.
| $folder | A spunQ_Folder where the archive should be created. | |
| $archiveName | A string which is the name of the zipfile to be created; NOTE: this name should end in ".zip"!! | |
| $fileNodes | An array of spunQ_FileNodes to be zipped. |
| spunQ_IOException |
Reimplemented from spunQ_ZipHandler.
Definition at line 43 of file PhpZipHandler.class.php.
| spunQ_PhpZipHandler::extract | ( | spunQ_ArchiveFile $ | file, | |
| spunQ_Folder $ | folder | |||
| ) |
Extracts the contents of an archive into given folder.
| $file | The archive to extract | |
| $folder | The folder to extract to |
| spunQ_IOException |
Implements spunQ_IArchiveHandler.
Definition at line 61 of file PhpZipHandler.class.php.
| static spunQ_PhpZipHandler::getInstance | ( | ) | [static] |
Retrieves Singleton instance.
Reimplemented from spunQ_ZipHandler.
Definition at line 26 of file PhpZipHandler.class.php.
| spunQ_PhpZipHandler::isAvailable | ( | ) |
Tests if the handler's zip functions are available or not.
Reimplemented from spunQ_ZipHandler.
Definition at line 36 of file PhpZipHandler.class.php.
| static spunQ_ZipHandler::setHandler | ( | spunQ_ZipHandler $ | handler | ) | [static, inherited] |
Sets the zip handler.
Mainly for testing purposes.
| $handler | The handler to use |
Definition at line 45 of file ZipHandler.class.php.
spunQ_PhpZipHandler::$instance = NULL [static, private] |
Singleton instance.
Reimplemented from spunQ_ZipHandler.
Definition at line 20 of file PhpZipHandler.class.php.
1.5.9