From 695bfb0360293caf471c9ce3e8af5e79e77eb0fe Mon Sep 17 00:00:00 2001 From: Greg Beaver Date: Mon, 24 Mar 2008 05:32:17 +0000 Subject: [PATCH] new docs git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@255935 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/phar/Phar/compress.xml | 117 +++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 reference/phar/Phar/compress.xml diff --git a/reference/phar/Phar/compress.xml b/reference/phar/Phar/compress.xml new file mode 100644 index 0000000000..d74e4beda4 --- /dev/null +++ b/reference/phar/Phar/compress.xml @@ -0,0 +1,117 @@ + + + + + Phar::compress + Compresses the entire Phar archive using Gzip or Bzip2 compression + + + + &reftitle.description; + + objectPhar::compress + intcompression + + &phar.write; + + + For tar-based abd phar-based phar archives, this method compresses the entire archive using + gzip compression or bzip2 compression. The resulting file can be processed with the + gunzip command/bunzip command, or accessed directly and transparently with the Phar + extension. + + + For Zip-based phar archives, this method fails with an exception. + The zlib extension must be enabled to compress + with gzip compression, the bzip2 extension must be + enabled in order to compress with bzip2 compression. + As with all functionality that modifies the contents of a phar, the + phar.readonly INI variable must be off + in order to succeed. + + + In addition, this method automatically renames the archive, appending .gz, + .bz2 or removing the extension if passed Phar::NONE to + remove compression. + + + A Phar or PharData object is returned + depending on whether the calling object is a Phar or + PharData. + + + + + &reftitle.errors; + + Throws BadMethodCallException if + the phar.readonly + INI variable is on, the zlib + extension is not available, or the bzip2 extension + is not enabled. + + + + + &reftitle.examples; + + + A <function>Phar::compress</function> example + +compress(Phar::GZ); // copies to /path/to/my.phar.gz +$p2 = $p->compress(Phar::BZ2); // copies to /path/to/my.phar.bz2 +$p3 = $p2->compress(Phar::NONE); // exception: /path/to/my.phar already exists +?> +]]> + + + + + + + &reftitle.seealso; + + + PharFileInfo::getCompressedSize + PharFileInfo::isCompressedBZIP2 + PharFileInfo::isCompressed + PharFileInfo::isCompressedGZ + PharFileInfo::setCompressedBZIP2 + PharFileInfo::setUncompressed + PharFileInfo::setCompressedGZ + Phar::canCompress + Phar::isCompressed + Phar::compressAllFilesBZIP2 + Phar::getSupportedCompression + Phar::uncompressAllFiles + + + + + + +