Class JArchiveZip

Description

Implements interfaces:

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>

  • since: 11.1

Located in /libraries/joomla/archive/zip.php (line 39)


	
			
Method Summary
 static boolean hasNativeSupport ()
 static boolean isSupported ()
 boolean checkZipData (string &$data)
 boolean create (string $archive, array $files)
 boolean extract (string $archive, string $destination, [array $options = array()])
 mixed extractCustom (string $archive, string $destination)
 boolean extractNative (string $archive, string $destination)
 int _unix2DOSTime ([int $unixtime = null])
Methods
static hasNativeSupport (line 170)

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

  • return: True if php has native ZIP support
  • since: 11.1
  • access: public
static boolean hasNativeSupport ()
static isSupported (line 158)

Tests whether this adapter can unpack files on this computer.

  • return: True if supported
  • since: 11.3
  • access: public
static boolean isSupported ()

Implementation of:
JArchiveExtractable::isSupported()
Tests whether this adapter can unpack files on this computer.
checkZipData (line 184)

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

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

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

  • return: True if successful.
  • todo: Finish Implementation
  • since: 11.1
  • access: public
boolean create (string $archive, array $files)
  • string $archive: Path to save archive.
  • array $files: Array of files to add to archive.
extract (line 127)

Extract a ZIP compressed file to a given path

  • return: True if successful
  • since: 11.1
  • throws: RuntimeException
  • 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]

Implementation of:
JArchiveExtractable::extract()
Extract a compressed file to a given path
extractCustom (line 207)

Extract a ZIP compressed file to a given path using a php based algorithm that only requires zlib support

  • return: True if successful
  • since: 11.1
  • throws: RuntimeException
  • access: protected
mixed extractCustom (string $archive, string $destination)
  • string $archive: Path to ZIP archive to extract.
  • string $destination: Path to extract archive into.
extractNative (line 300)

Extract a ZIP compressed file to a given path using native php api calls for speed

  • return: True on success
  • since: 11.1
  • throws: RuntimeException
  • access: protected
boolean extractNative (string $archive, string $destination)
  • string $archive: Path to ZIP archive to extract
  • string $destination: Path to extract archive into
_unix2DOSTime (line 555)

Converts a UNIX timestamp to a 4-byte DOS date and time format (date in high 2-bytes, time in low 2-bytes allowing magnitude comparison).

  • return: The current date in a 4-byte DOS format.
  • since: 11.1
  • access: protected
int _unix2DOSTime ([int $unixtime = null])
  • int $unixtime: The current UNIX timestamp.

Documentation generated on Tue, 19 Nov 2013 15:18:40 +0100 by phpDocumentor 1.4.3