spunQ_ZipHandler Class Reference

An abstract class for zipfile handling. More...

Inheritance diagram for spunQ_ZipHandler:

spunQ_IArchiveHandler spunQ_PhpZipHandler

List of all members.

Public Member Functions

 __construct ()
 Constructor.
 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.
static setHandler (spunQ_ZipHandler $handler)
 Sets the zip handler.

Static Private Attributes

static $registeredHandlers = array()
 Array of all registered handlers.
static $instance
 Singleton instance.


Detailed Description

An abstract class for zipfile handling.

Definition at line 6 of file ZipHandler.class.php.


Constructor & Destructor Documentation

spunQ_ZipHandler::__construct (  ) 

Constructor.

Adds itself to $registeredHandlers.

Definition at line 57 of file ZipHandler.class.php.


Member Function Documentation

spunQ_ZipHandler::createZip ( spunQ_Folder folder,
archiveName,
array $  fileNodes 
) [abstract]

Creates a zipfile.

Parameters:
$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.
Returns:
void
Exceptions:
spunQ_IOException 

Reimplemented in spunQ_PhpZipHandler.

spunQ_IArchiveHandler::extract ( spunQ_ArchiveFile file,
spunQ_Folder folder 
) [inherited]

Extracts the contents of an archive into given folder.

Parameters:
$file The archive to extract
$folder The folder to extract to
Returns:
void
Exceptions:
spunQ_IOException 

Implemented in spunQ_PhpZipHandler.

static spunQ_ZipHandler::getInstance (  )  [static]

Retrieves Singleton.

Returns:
spunQ_ZipHandler

Reimplemented in spunQ_PhpZipHandler.

Definition at line 24 of file ZipHandler.class.php.

spunQ_ZipHandler::isAvailable (  )  [abstract]

Tests if the handler's zip functions are available or not.

Returns:
bool

Reimplemented in spunQ_PhpZipHandler.

static spunQ_ZipHandler::setHandler ( spunQ_ZipHandler handler  )  [static]

Sets the zip handler.

Mainly for testing purposes.

Parameters:
$handler The handler to use
Returns:
void

Definition at line 45 of file ZipHandler.class.php.


Member Data Documentation

spunQ_ZipHandler::$instance [static, private]

Singleton instance.

Type:
spunQ_ZipHandler

Reimplemented in spunQ_PhpZipHandler.

Definition at line 18 of file ZipHandler.class.php.

spunQ_ZipHandler::$registeredHandlers = array() [static, private]

Array of all registered handlers.

Type:
array<spunQ_ZipHandler>

Definition at line 12 of file ZipHandler.class.php.


The documentation for this class was generated from the following file:

Generated on Fri Jul 1 11:12:44 2011 for spunQ3 by  doxygen 1.5.9