Class JArchiveZip

Description

ZIP format adapter for the JArchive class

The ZIP compression code is partially based on code from: Eric Mueller <eric@themepark.com> http://www.zend.com/codex.php?id=535&single=1

Deins125 <webmaster@atlant.ru> http://www.zend.com/codex.php?id=470&single=1

The ZIP compression date code is partially based on code from Peter Listiak <mlady@users.sourceforge.net>

This class is inspired from and draws heavily in code and concept from the Compress package of The Horde Project <http://www.horde.org>

Located in /Servers/Apache_2_2/htdocs/Joomla15/libraries/joomla/filesystem/archive/zip.php (line 43)

JObject
   |
   --JArchiveZip
Variable Summary
string $_ctrlDirEnd
string $_data
string $_fileHeader
array $_metadata
array $_methods
Method Summary
boolean checkZipData ( &$data, string $data)
boolean create (string $archive, array $files, [array $options = array ()])
boolean extract (string $archive, string $destination, [array $options = array ()])
boolean hasNativeSupport ()
Variables
string $_ctrlDirEnd = "\x50\x4b\x05\x06\x00\x00\x00\x00" (line 70)

End of central directory record.

string $_ctrlDirHeader = "\x50\x4b\x01\x02" (line 64)

Beginning of central directory record.

string $_data = null (line 82)

ZIP file data buffer

string $_fileHeader = "\x50\x4b\x03\x04" (line 76)

Beginning of file contents.

array $_metadata = null (line 88)

ZIP file metadata array

array $_methods = array (
0x0 => 'None',
0x1 => 'Shrunk',
0x2 => 'Super Fast',
0x3 => 'Fast',
0x4 => 'Normal',
0x5 => 'Maximum',
0x6 => 'Imploded',
0x8 => 'Deflated'
)
(line 49)

ZIP compression methods.

Inherited Variables

Inherited from JObject

JObject::$_errors
Methods
checkZipData (line 160)

Checks to see if the data is a valid ZIP file.

  • return: True if valid, false if invalid.
  • since: 1.5
  • access: public
boolean checkZipData ( &$data, string $data)
  • string $data: ZIP archive data buffer
  • &$data
create (line 102)

Create a ZIP compressed file from an array of file data.

  • return: True if successful
  • todo: Finish Implementation
  • since: 1.5
  • access: public
boolean create (string $archive, array $files, [array $options = array ()])
  • string $archive: Path to save archive
  • array $files: Array of files to add to archive
  • array $options: Compression options [unused]
extract (line 125)

Extract a ZIP compressed file to a given path

  • return: True if successful
  • since: 1.5
  • access: public
boolean extract (string $archive, string $destination, [array $options = array ()])
  • string $archive: Path to ZIP archive to extract
  • string $destination: Path to extract archive into
  • array $options: Extraction options [unused]
hasNativeSupport (line 147)

Method to determine if the server has native zip support for faster handling

  • return: True if php has native ZIP support
  • since: 1.5
  • access: public
boolean hasNativeSupport ()

Inherited Methods

Inherited From JObject

JObject::JObject()
JObject::__construct()
JObject::get()
JObject::getError()
JObject::getErrors()
JObject::getProperties()
JObject::getPublicProperties()
JObject::set()
JObject::setError()
JObject::setProperties()
JObject::toString()

Documentation generated on Sun, 06 Apr 2008 07:15:33 +0200 by phpDocumentor 1.4.0a2