PharFileInfo::getMetadata

(PHP >= 5.3.0, PECL phar >= 1.0.0) Returns file-specific meta-data saved with a file public mixed PharFileInfo::getMetadata ( void ) Return meta-data that was saved in the Phar archive's manifest for this file. Returns: any PHP variable that can be serialized and is stored as meta-data for the file, or NULL if no meta-data is stored. Examples

PharFileInfo::getCompressedSize

(PHP >= 5.3.0, PECL phar >= 1.0.0) Returns the actual size of the file (with compression) inside the Phar archive public int PharFileInfo::getCompressedSize ( void ) This returns the size of the file within the Phar archive. Uncompressed files will return the same value for getCompressedSize as they will with filesize() Returns: The size in bytes of the file within the Phar archive on disk.

PharFileInfo::getCRC32

(PHP >= 5.3.0, PECL phar >= 1.0.0) Returns CRC32 code or throws an exception if CRC has not been verified public int PharFileInfo::getCRC32 ( void ) This returns the crc32() checksum of the file within the Phar archive. Returns: The crc32() checksum of the file within the Phar archive. Exception: Throws BadMethodCallException if the file has not yet had its

PharFileInfo::delMetadata

(PHP >= 5.3.0, PECL phar >= 1.2.0) Deletes the metadata of the entry public bool PharFileInfo::delMetadata ( void ) Deletes the metadata of the entry, if any. Returns: Returns TRUE if successful, FALSE if the entry had no metadata. As with all functionality that modifies the contents of a phar, the phar.readonly INI variable must be off in order to succeed if the file is within a Phar archiv

PharFileInfo::decompress

(PHP >= 5.3.0, PECL phar >= 2.0.0) Decompresses the current Phar entry within the phar public bool PharFileInfo::decompress ( void ) This method decompresses the file inside the Phar archive. Depending on how the file is compressed, the bzip2 or zlib extensions must be enabled to take advantage of this feature. As with all functionality that modifies the contents of a phar, the phar.readonly INI variable must be off in

PharFileInfo::__construct

(PHP >= 5.3.0, PECL phar >= 1.0.0) Construct a Phar entry object public PharFileInfo::__construct ( string $entry ) This should not be called directly. Instead, a PharFileInfo object is initialized by calling Phar::offsetGet() through array access. Parameters: entry The full url to retrieve a file. If you wish to retrieve the information for the file my/file.php fro

PharFileInfo::compress

(PHP >= 5.3.0, PECL phar >= 2.0.0) Compresses the current Phar entry with either zlib or bzip2 compression public bool PharFileInfo::compress ( int $compression ) This method compresses the file inside the Phar archive using either bzip2 compression or zlib compression. The bzip2 or zlib extension must be enabled to take advantage of this feature. In addition, if the file is already compressed, the respective extension

PharFileInfo::chmod

(PHP >= 5.3.0, PECL phar >= 1.0.0) Sets file-specific permission bits public void PharFileInfo::chmod ( int $permissions ) PharFileInfo::chmod() allows setting of the executable file permissions bit, as well as read-only bits. Writeable bits are ignored, and set at runtime based on the phar.readonly INI variable. As with all functionality that modifies the contents of a phar, the phar.readonly INI variable must be off

PharData::setStub

(PHP >= 5.3.0, PECL phar >= 2.0.0) dummy function (Phar::setStub is not valid for PharData) bool PharData::setStub ( string $stub [, int $len = -1 ] ) Non-executable tar/zip archives cannot have a stub, so this method simply throws an exception. Parameters: stub A string or an open stream handle to use as the executable stub for this phar archive. This parameter is

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 ) 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 Phar::MD5, Phar::SHA1, Phar