mirror of
https://github.com/macintoshplus/doc-fr.git
synced 2026-03-26 09:52:17 +01:00
141 lines
3.8 KiB
XML
141 lines
3.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- EN-Revision: f03806fcd8fe03a0501bd40b6e3939ff6589a1d2 Maintainer: gui Status: ready -->
|
|
<!-- Reviewed: no -->
|
|
<refentry xml:id="pharfileinfo.iscompressed" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>PharFileInfo::isCompressed</refname>
|
|
<refpurpose>Retourne si l'entrée est compressée</refpurpose>
|
|
</refnamediv>
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis role="PharFileInfo">
|
|
<modifier>public</modifier> <type>bool</type><methodname>PharFileInfo::isCompressed</methodname>
|
|
<methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>compression</parameter><initializer>&null;</initializer></methodparam>
|
|
</methodsynopsis>
|
|
|
|
<para>
|
|
Cette méthode détermine si un fichier au sein d'une archive Phar est compressé
|
|
avec une des compressions Gzip ou Bzip2.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>compression</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Une des compressions <constant>Phar::GZ</constant> ou <constant>Phar::BZ2</constant>,
|
|
aucune compression par défaut.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
&true; si le fichier au sein de l'archive est compressé, &false; sinon.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="changelog">
|
|
&reftitle.changelog;
|
|
<informaltable>
|
|
<tgroup cols="2">
|
|
<thead>
|
|
<row>
|
|
<entry>&Version;</entry>
|
|
<entry>&Description;</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry>8.0.0</entry>
|
|
<entry>
|
|
<parameter>compression</parameter> est désormais nullable.
|
|
</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</informaltable>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Un exemple avec <function>PharFileInfo::isCompressed</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
try {
|
|
$p = new Phar('/chemin/vers/mon.phar', 0, 'mon.phar');
|
|
$p['monfichier.txt'] = 'salut';
|
|
$p['monfichier2.txt'] = 'salut';
|
|
$p['monfichier2.txt']->setCompressedGZ();
|
|
$file = $p['monfichier.txt'];
|
|
$file2 = $p['monfichier2.txt'];
|
|
var_dump($file->isCompressed());
|
|
var_dump($file2->isCompressed());
|
|
} catch (Exception $e) {
|
|
echo 'La création/modification de mon.phar a échoué : ', $e;
|
|
}
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs;
|
|
<screen>
|
|
<![CDATA[
|
|
bool(false)
|
|
bool(true)
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>PharFileInfo::getCompressedSize</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::isCompressed</function></member>
|
|
<member><function>Phar::getSupportedCompression</function></member>
|
|
<member><function>Phar::decompressFiles</function></member>
|
|
<member><function>Phar::compressFiles</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
|
|
-->
|