Class xPDOZip

Description

Represents a compressed archive in ZIP format.

Located in /compression/xpdozip.class.php (line 36)


	
			
Class Constant Summary
 CREATE = 'create'
 OVERWRITE = 'overwrite'
 ZIP_TARGET = 'zip_target'
Variable Summary
 mixed $xpdo
 mixed $_archive
 mixed $_errors
 mixed $_filename
 mixed $_options
Method Summary
 xPDOZip __construct (xPDO &$xpdo, string $filename, [ $options = array()])
 void close ()
 void getErrors ()
 mixed getOption (string $key, [array $options = null], [mixed $default = null])
 boolean hasError ()
 array pack (string $source, [ $options = array()])
 array unpack (string $target, [array $options = array()])
Variables
mixed $xpdo = null (line 41)
  • access: public
mixed $_archive = null (line 44)
  • access: protected
mixed $_errors = array() (line 45)
  • access: protected
mixed $_filename = '' (line 42)
  • access: protected
mixed $_options = array() (line 43)
  • access: protected
Methods
Constructor __construct (line 54)

Construct an instance representing a specific archive.

  • access: public
xPDOZip __construct (xPDO &$xpdo, string $filename, [ $options = array()])
  • xPDO &$xpdo: A reference to an xPDO instance.
  • string $filename: The name of the archive the instance will represent.
  • array $options: An array of options for this instance.
close (line 151)

Close the archive.

  • access: public
void close ()
getErrors (line 200)

Return any errors from operations on the archive.

  • access: public
void getErrors ()
getOption (line 166)

Get an option from supplied options, the xPDOZip instance options, or xpdo itself.

  • return: The value of the option.
  • access: public
mixed getOption (string $key, [array $options = null], [mixed $default = null])
  • string $key: Unique identifier for the option.
  • array $options: A set of explicit options to override those from xPDO or the xPDOZip instance.
  • mixed $default: An optional default value to return if no value is found.
hasError (line 193)

Detect if errors occurred during any operations.

  • return: True if errors exist, otherwise false.
  • access: public
boolean hasError ()
pack (line 91)

Pack the contents from the source into the archive.

  • return: An array of results for the operation.
  • todo: Implement custom file filtering options
  • access: public
array pack (string $source, [ $options = array()])
  • string $source: The path to the source file(s) to pack.
  • array $options: An array of options for the operation.
unpack (line 138)

Unpack the compressed contents from the archive to the target.

  • return: An array of results for the operation.
  • access: public
array unpack (string $target, [array $options = array()])
  • string $target: The path of the target location to unpack the files.
  • array $options: An array of options for the operation.
Class Constants
CREATE = 'create' (line 37)
OVERWRITE = 'overwrite' (line 38)
ZIP_TARGET = 'zip_target' (line 39)

Documentation generated on Mon, 27 Dec 2010 11:08:34 -0700 by phpDocumentor 1.4.3