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

PharData::addEmptyDir

(PHP >= 5.3.0, PECL phar >= 2.0.0) Add an empty directory to the tar/zip archive bool PharData::addEmptyDir ( string $dirname ) With this method, an empty directory is created with path dirname. This method is similar to ZipArchive::addEmptyDir(). Parameters: dirname The name of the empty directory to create in the phar archive Returns: no

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

(PHP >= 5.3.0, PECL phar >= 1.1.0) set the signature algorithm for a phar and apply it. public void Phar::setSignatureAlgorithm ( int $sigtype [, string $privatekey ] ) 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 signature algorithm for a phar and apply it. The signature algorithm must be one of Pha

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