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

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

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

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