Phar::compressFiles

(PHP >= 5.3.0, PECL phar >= 2.0.0) Compresses all files in the current Phar archive public void Phar::compressFiles ( int $compression ) 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 phar archives, this method throws a BadMethodCallException, as compression of individual files within a tar archi

Phar::__construct

(PHP >= 5.3.0, PECL phar >= 1.0.0) Construct a Phar archive object public Phar::__construct ( string $fname [, int $flags [, string $alias ]] ) Parameters: fname Path to an existing Phar archive or to-be-created archive. The file name's extension must contain .phar. flags Flags to pass to parent class RecursiveDirectoryIterator.

Phar::convertToData

(PHP >= 5.3.0, PECL phar >= 2.0.0) Convert a phar archive to a non-executable tar or zip file public PharData Phar::convertToData ([ int $format = 9021976 [, int $compression = 9021976 [, string $extension ]]] ) This method is used to convert an executable phar archive to either a tar or zip file. To make the tar or zip non-executable, the phar stub and phar alias files are removed from the newly created archive. I

Phar::convertToExecutable

(PHP >= 5.3.0, PECL phar >= 2.0.0) Convert a phar archive to another executable phar archive file format public Phar Phar::convertToExecutable ([ int $format = 9021976 [, int $compression = 9021976 [, 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. This method is used to convert a phar

Phar::copy

(PHP >= 5.3.0, PECL phar >= 2.0.0) Copy a file internal to the phar archive to another new file within the phar public bool Phar::copy ( string $oldfile, string $newfile ) 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. Copy a file internal to the phar archive to another new file within the phar. This is an obje

Phar::count

(PHP >= 5.3.0, PECL phar >= 1.0.0) Returns the number of entries (files) in the Phar archive public int Phar::count ( void ) Returns: The number of files contained within this phar, or 0 (the number zero) if none. Examples: A Phar::count() example <?php // make sure it doesn't exist @unlink('brandnewphar.phar'); tr

Phar::createDefaultStub

(Unknown) Create a phar-file format specific stub final public static string Phar::createDefaultStub ([ string $indexfile [, string $webindexfile ]] ) This method is intended for creation of phar-file format-specific stubs, and is not intended for use with tar- or zip-based phar archives. Phar archives contain a bootstrap loader, or stub written in PHP that is executed when the archive is executed in PHP either via include

Phar::decompress

(PHP >= 5.3.0, PECL phar >= 2.0.0) Decompresses the entire Phar archive public object Phar::decompress ([ 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 decompresses the entire archive. For Zip-based phar archives, this method fails

Phar::decompressFiles

(PHP >= 5.3.0, PECL phar >= 2.0.0) Decompresses all files in the current Phar archive public bool Phar::decompressFiles ( void ) 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 phar archives, this method throws a BadMethodCallException, as compression of individual files within a tar archive is not

Phar::delMetadata

(PHP >= 5.3.0, PECL phar >= 1.2.0) Deletes the global metadata of the phar public bool Phar::delMetadata ( void ) 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. Deletes the global metadata of the phar Returns: returns TRUE on success, but it is better to check for thrown exception, a