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::addFile

(PHP >= 5.3.0, PECL phar >= 2.0.0) Add a file from the filesystem to the tar/zip archive public void Phar::addFile ( string $file [, string $localname ] ) With this method, any file or URL can be added to the tar/zip archive. If the optional second parameter localname is specified, the file will be stored in the archive with that name, otherwise the file parameter is used as the path to store within the archive. URLs

Phar::unlinkArchive

(PHP >= 5.3.0, PECL phar >= 2.0.0) Completely remove a phar archive from disk and from memory final public static bool Phar::unlinkArchive ( string $archive ) Removes a phar archive for disk and memory. Parameters: archive The path on disk to the phar archive. Returns: Returns TRUE on success or FALSE on failure. Exc

Phar::webPhar

(PHP >= 5.3.0, PECL phar >= 2.0.0) mapPhar for web-based phars. front controller for web applications final public static void Phar::webPhar ([ string $alias [, string $index = "index.php" [, string $f404 [, array $mimetypes [, callable $rewrites ]]]]] ) Phar::mapPhar() for web-based phars. This method parses $_SERVER['REQUEST_URI'] and routes a request from a web browser to an internal file within the phar archive.

Phar::startBuffering

(PHP >= 5.3.0, PECL phar >= 1.0.0) Start buffering Phar write operations, do not modify the Phar object on disk public void Phar::startBuffering ( void ) Although technically unnecessary, the Phar::startBuffering() method can provide a significant performance boost when creating or modifying a Phar archive with a large number of files. Ordinarily, every time a file within a Phar archive is created or modified in any w

Phar::uncompressAllFiles

(PECL phar < 2.0.0) Uncompresses all files in the current Phar archive public bool Phar::uncompressAllFiles ( 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 phar.readonly to be set to 0 in order to

Phar::stopBuffering

(PHP >= 5.3.0, PECL phar >= 1.0.0) Stop buffering write requests to the Phar archive, and save changes to disk public void Phar::stopBuffering ( void ) Phar::stopBuffering() is used in conjunction with the Phar::startBuffering() method. Phar::startBuffering() can provide a significant performance boost when creating or modifying a Phar archive with a large number of files. Ordinarily, every time a file within a Phar a

Phar::setStub

(PHP >= 5.3.0, PECL phar >= 1.0.0) Used to set the PHP loader or bootstrap stub of a Phar archive public bool Phar::setStub ( string $stub [, int $len = -1 ] ) 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 add a PHP bootstrap loader stub to a new Phar archive, or to replace the loader s

Phar::setAlias

(PHP >= 5.3.0, PECL phar >= 1.2.1) Set the alias for the Phar archive public bool Phar::setAlias ( string $alias ) 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. Set the alias for the Phar archive, and write it as the permanent alias for this phar archive. An alias can be used internally to a phar archive to en

Phar::setMetadata

(PHP >= 5.3.0, PECL phar >= 1.0.0) Sets phar archive meta-data public void Phar::setMetadata ( mixed $metadata ) 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. Phar::setMetadata() should be used to store customized data that describes something about the phar archive as a complete entity. PharFileInfo::setMeta