php-doc-en/reference/phar/PharFileInfo/isCompressedBZIP2.xml
Daniel Egeberg 96c9d88bad Converted to utf-8
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@297028 c90b9560-bf6c-de11-be94-00142212c4b1
2010-03-28 22:10:10 +00:00

109 lines
3.1 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="pharfileinfo.iscompressedbzip2">
<refnamediv>
<refname>PharFileInfo::isCompressedBZIP2</refname>
<refpurpose>Returns whether the entry is compressed using bzip2</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>PharFileInfo::isCompressedBZIP2</methodname>
<void/>
</methodsynopsis>
&phar.removed.pharfileinfocompress;
<para>
This returns whether a file is compressed within a Phar archive
with Bzip2 compression.
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&true; if the file is compressed within the Phar archive using Bzip2, &false; if not.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>PharFileInfo::isCompressedBZIP2</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
try {
$p = new Phar('/path/to/my.phar', 0, 'my.phar');
$p['myfile.txt'] = 'hi';
$p['myfile2.txt'] = 'hi';
$p['myfile3.txt'] = 'hi';
$p['myfile2.txt']->setCompressedGZ();
$p['myfile3.txt']->setCompressedBZIP2();
$file = $p['myfile.txt'];
$file2 = $p['myfile2.txt'];
$file3 = $p['myfile3.txt'];
var_dump($file->isCompressedBZIP2());
var_dump($file2->isCompressedBZIP2());
var_dump($file3->isCompressedBZIP2());
} catch (Exception $e) {
echo 'Create/modify on phar my.phar failed: ', $e;
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
bool(false)
bool(false)
bool(true)
]]>
</screen>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>PharFileInfo::getCompressedSize</function></member>
<member><function>PharFileInfo::isCompressed</function></member>
<member><function>PharFileInfo::isCompressedGZ</function></member>
<member><function>PharFileInfo::setCompressedBZIP2</function></member>
<member><function>PharFileInfo::setUncompressed</function></member>
<member><function>PharFileInfo::setCompressedGZ</function></member>
<member><function>Phar::canCompress</function></member>
<member><function>Phar::isCompressed</function></member>
<member><function>Phar::compressAllFilesBZIP2</function></member>
<member><function>Phar::compressAllFilesGZ</function></member>
<member><function>Phar::getSupportedCompression</function></member>
<member><function>Phar::uncompressAllFiles</function></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->