Phar::addFile

(Unknown) Add a file from the filesystem to the phar archive public void Phar::addFile ( string $file [, string $localname ] ) Note: This method requires the php.ini setting phar.readonly to be set to 0 in order to work for Phar objects. Otherwise, a PharException will be thrown. With this method, any file or URL can be added to the phar archive. If the optional second parameter localname is specified, the file will be s

Phar::addFromString

(Unknown) Add a file from a string to the phar archive public void Phar::addFromString ( string $localname, string $contents ) Note: This method requires the php.ini setting phar.readonly to be set to 0 in order to work for Phar objects. Otherwise, a PharException will be thrown. With this method, any string can be added to the phar archive. The file will be stored in the archive with localname as its path. This method i

Phar::apiVersion

(PHP >= 5.3.0, PECL phar >= 1.0.0) Returns the api version final public static string Phar::apiVersion ( void ) Return the API version of the phar file format that will be used when creating phars. The Phar extension supports reading API version 1.0.0 or newer. API version 1.1.0 is required for SHA-256 and SHA-512 hash, and API version 1.1.1 is required to store empty directories. Returns: T

Phar::buildFromDirectory

(PHP >= 5.3.0, PECL phar >= 2.0.0) Construct a phar archive from the files within a directory. public array Phar::buildFromDirectory ( string $base_dir [, string $regex ] ) Note: This method requires the php.ini setting phar.readonly to be set to 0 in order to work for Phar objects. Otherwise, a PharException will be thrown. Populate a phar archive from directory contents. The optional second parameter is a regular

Phar::buildFromIterator

(PHP >= 5.3.0, PECL phar >= 2.0.0) Construct a phar archive from an iterator. public array Phar::buildFromIterator ( Iterator $iter [, string $base_directory ] ) Note: This method requires the php.ini setting phar.readonly to be set to 0 in order to work for Phar objects. Otherwise, a PharException will be thrown. Populate a phar archive from an iterator. Two styles of iterators are supported, iterators that map the

Phar::canCompress

(PHP >= 5.3.0, PECL phar >= 1.0.0) Returns whether phar extension supports compression using either zlib or bzip2 final public static bool Phar::canCompress ([ int $type = 0 ] ) This should be used to test whether compression is possible prior to loading a phar archive containing compressed files. Parameters: type Either Phar::GZ or Phar::BZ2 can be used to test wh

Phar::canWrite

(PHP >= 5.3.0, PECL phar >= 1.0.0) Returns whether phar extension supports writing and creating phars final public static bool Phar::canWrite ( void ) This static method determines whether write access has been disabled in the system php.ini via the phar.readonly ini variable. Returns: TRUE if write access is enabled, FALSE if it is disabled.

Phar::compress

(PHP >= 5.3.0, PECL phar >= 2.0.0) Compresses the entire Phar archive using Gzip or Bzip2 compression public object Phar::compress ( int $compression [, string $extension ] ) Note: This method requires the php.ini setting phar.readonly to be set to 0 in order to work for Phar objects. Otherwise, a PharException will be thrown. For tar-based and phar-based phar archives, this method compresses the entire archive usin

Phar::compressAllFilesBZIP2

(PHP >= 5.3.0, PECL phar >= 1.0.0) Compresses all files in the current Phar archive using Bzip2 compression public bool Phar::compressAllFilesBZIP2 ( void ) Note: This method has been removed from the phar extension as of version 2.0.0. Alternative implementations are available using Phar::compress(), Phar::decompress(), Phar::compressFiles() and Phar::decompressFiles(). Note: This method requires the php.ini setti

Phar::compressAllFilesGZ

(PHP >= 5.3.0, PECL phar >= 1.0.0) Compresses all files in the current Phar archive using Gzip compression public bool Phar::compressAllFilesGZ ( void ) Note: This method has been removed from the phar extension as of version 2.0.0. Alternative implementations are available using Phar::compress(), Phar::decompress(), Phar::compressFiles() and Phar::decompressFiles(). Note: This method requires the php.ini setting p