Files
doc-fr/reference/phar/Phar/isCompressed.xml
George Peter Banyard ede1b06016 Sync Phar docs with EN
2021-09-07 17:20:29 +01:00

112 lines
3.1 KiB
XML

<?xml version='1.0' encoding='utf-8'?>
<!-- $Revision$ -->
<!-- EN-Revision: 28046efaba656e158bdf45a2585c23a339943869 Maintainer: gui Status: ready -->
<!-- Reviewed: yes -->
<refentry xml:id="phar.iscompressed" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Phar::isCompressed</refname>
<refpurpose>Retourne Phar::GZ ou PHAR::BZ2 si l'archive entière est compressée (.tar.gz/tar.bz, etc)</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type class="union"><type>int</type><type>false</type></type><methodname>Phar::isCompressed</methodname>
<void/>
</methodsynopsis>
&phar.write;
<para>
Retourne Phar::GZ ou PHAR::BZ2 si l'archive entière est compressée
(.tar.gz/tar.bz, etc). Les archives phar basées sur Zip ne peuvent
pas être compressées en tant que fichier, et cette méthode retournera
toujours &false; si une archive phar basée sur Zip est interrogée.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
Aucun paramètre.
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
<literal>Phar::GZ</literal>, <literal>Phar::BZ2</literal> ou &false;.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Exemple avec <function>Phar::isCompressed</function></title>
<programlisting role="php">
<![CDATA[
<?php
try {
$phar1 = new Phar('monphar.zip.phar');
var_dump($phar1->isCompressed());
$phar2 = new Phar('monpharnoncompresse.tar.phar');
var_dump($phar2->isCompressed());
$phar2->compress(Phar::GZ);
var_dump($phar2->isCompressed() == Phar::GZ);
} catch (Exception $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::decompress</function></member>
<member><function>PharFileInfo::compress</function></member>
<member><function>Phar::decompress</function></member>
<member><function>Phar::compress</function></member>
<member><function>Phar::canCompress</function></member>
<member><function>Phar::compressFiles</function></member>
<member><function>Phar::decompressFiles</function></member>
<member><function>Phar::getSupportedCompression</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
-->