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

PharData::setDefaultStub

(PHP >= 5.3.0, PECL phar >= 2.0.0) dummy function (Phar::setDefaultStub is not valid for PharData) bool PharData::setDefaultStub ([ string $index [, string $webindex ]] ) Non-executable tar/zip archives cannot have a stub, so this method simply throws an exception. Parameters: index Relative path within the phar archive to run if accessed on the command-line

PharData::setAlias

(PHP >= 5.3.0, PECL phar >= 2.0.0) dummy function (Phar::setAlias is not valid for PharData) bool PharData::setAlias ( string $alias ) Non-executable tar/zip archives cannot have an alias, so this method simply throws an exception. Parameters: alias A shorthand string that this archive can be referred to in phar stream wrapper access. This parameter is ignored.

PharData::offsetUnset

(PHP >= 5.3.0, PECL phar >= 2.0.0) remove a file from a tar/zip archive bool PharData::offsetUnset ( string $offset ) This is an implementation of the ArrayAccess interface allowing direct manipulation of the contents of a tar/zip archive using array access brackets. offsetUnset is used for deleting an existing file, and is called by the unset() language construct. Parameters: o

PharData::offsetSet

(PHP >= 5.3.0, PECL phar >= 2.0.0) set the contents of a file within the tar/zip to those of an external file or string void PharData::offsetSet ( string $offset, string $value ) This is an implementation of the ArrayAccess interface allowing direct manipulation of the contents of a tar/zip archive using array access brackets. offsetSet is used for modifying an existing file, or adding a new file to a tar/zip archive.

PharData::isWritable

(PHP >= 5.3.0, PECL phar >= 2.0.0) Returns true if the tar/zip archive can be modified bool PharData::isWritable ( void ) This method returns TRUE if the tar/zip archive on disk is not read-only. Unlike Phar::isWritable(), data-only tar/zip archives can be modified even if phar.readonly is set to 1. Returns: Returns TRUE if the tar/zip archive can be modified

PharData::extractTo

(PHP >= 5.3.0, PECL phar >= 2.0.0) Extract the contents of a tar/zip archive to a directory bool PharData::extractTo ( string $pathto [, string|array $files [, bool $overwrite = false ]] ) Extract all files within a tar/zip archive to disk. Extracted files and directories preserve permissions as stored in the archive. The optional parameters allow optional control over which files are extracted, and whether existing

PharData::delete

(PHP >= 5.3.0, PECL phar >= 2.0.0) Delete a file within a tar/zip archive bool PharData::delete ( string $entry ) Delete a file within an archive. This is the functional equivalent of calling unlink() on the stream wrapper equivalent, as shown in the example below. Parameters: entry Path within an archive to the file to delete. Returns: ret

PharData::delMetadata

(PHP >= 5.3.0, PECL phar >= 2.0.0) Deletes the global metadata of a zip archive bool PharData::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 zip archive Returns: returns TRUE on success, but it is better to check for thrown exc

PharData::decompressFiles

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