PharData::decompress

(PHP >= 5.3.0, PECL phar >= 2.0.0) Decompresses the entire Phar archive object PharData::decompress ([ string $extension ] ) For tar-based archives, this method decompresses the entire archive. For Zip-based archives, this method fails with an exception. The zlib extension must be enabled to decompress an archive compressed with gzip compression, and the bzip2 extension must be enabled in order to decompress an archi

PharData::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 bool PharData::copy ( string $oldfile, string $newfile ) Copy a file internal to the tar/zip archive to another new file within the same archive. This is an object-oriented alternative to using copy() with the phar stream wrapper. Parameters: oldfile Copy

PharData::convertToExecutable

(PHP >= 5.3.0, PECL phar >= 2.0.0) Convert a non-executable tar/zip archive to an executable phar archive Phar PharData::convertToExecutable ([ int $format [, 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. This method is used to convert a non-executable tar or zip arc

PharData::convertToData

(PHP >= 5.3.0, PECL phar >= 2.0.0) Convert a phar archive to a non-executable tar or zip file PharData PharData::convertToData ([ int $format [, int $compression [, string $extension ]]] ) This method is used to convert a non-executable tar or zip archive to another non-executable format. If no changes are specified, this method throws a BadMethodCallException. This method should be used to convert a tar archive to z

PharData::__construct

(PHP >= 5.3.0, PECL phar >= 2.0.0) Construct a non-executable tar or zip archive object PharData::__construct ( string $fname [, int $flags [, string $alias [, int $format = Phar::TAR ]]] ) Parameters: fname Path to an existing tar/zip archive or to-be-created archive flags Flags to pass to Phar parent class RecursiveDirectoryItera

PharData::compressFiles

(PHP >= 5.3.0, PECL phar >= 2.0.0) Compresses all files in the current tar/zip archive bool PharData::compressFiles ( int $compression ) For tar-based archives, this method throws a BadMethodCallException, as compression of individual files within a tar archive is not supported by the file format. Use PharData::compress() to compress an entire tar-based archive. For Zip-based archives, this method compresses all file

PharData::compress

(PHP >= 5.3.0, PECL phar >= 2.0.0) Compresses the entire tar/zip archive using Gzip or Bzip2 compression object PharData::compress ( int $compression [, string $extension ] ) For tar archives, this method compresses the entire archive using gzip compression or bzip2 compression. The resulting file can be processed with the gunzip command/bunzip command, or accessed directly and transparently with the Phar extension.

PharData::buildFromIterator

(PHP >= 5.3.0, PECL phar >= 2.0.0) Construct a tar or zip archive from an iterator. array PharData::buildFromIterator ( Iterator $iter [, string $base_directory ] ) Populate a tar or zip archive from an iterator. Two styles of iterators are supported, iterators that map the filename within the tar/zip to the name of a file on disk, and iterators like DirectoryIterator that return SplFileInfo objects. For iterators that

PharData::buildFromDirectory

(PHP >= 5.3.0, PECL phar >= 2.0.0) Construct a tar/zip archive from the files within a directory. public array Phar::buildFromDirectory ( string $base_dir [, string $regex ] ) Populate a tar/zip archive from directory contents. The optional second parameter is a regular expression (pcre) that is used to exclude files. Any filename that matches the regular expression will be included, all others will be excluded. For mo

PharData::addFromString

(PHP >= 5.3.0, PECL phar >= 2.0.0) Add a file from the filesystem to the tar/zip archive bool PharData::addFromString ( string $localname, string $contents ) With this method, any string can be added to the tar/zip archive. The file will be stored in the archive with localname as its path. This method is similar to ZipArchive::addFromString(). Parameters: localname