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

(PHP >= 5.3.0, PECL phar >= 1.0.0) Returns the Phar file entry flags public int PharFileInfo::getPharFlags ( void ) This returns the flags set in the manifest for a Phar. This will always return 0 in the current implementation. Returns: The Phar flags (always 0 in the current implementation) Examples: A PharFileInfo::getPharFlags

PharFileInfo::hasMetadata

(PHP >= 5.3.0, PECL phar >= 1.2.0) Returns the metadata of the entry public bool PharFileInfo::hasMetadata ( void ) Returns the metadata of a file within a phar archive. Returns: Returns FALSE if no metadata is set or is NULL, TRUE if metadata is not NULL See also: PharFileInfo::setMetadata() -

PharFileInfo::isCRCChecked

(PHP >= 5.3.0, PECL phar >= 1.0.0) Returns whether file entry has had its CRC verified public bool PharFileInfo::isCRCChecked ( void ) This returns whether a file within a Phar archive has had its CRC verified. Returns: TRUE if the file has had its CRC verified, FALSE if not. Examples: A PharFileInfo::isCRCChecked() example