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