mirror of
https://github.com/macintoshplus/doc-fr.git
synced 2026-03-25 17:32:07 +01:00
99 lines
2.4 KiB
XML
99 lines
2.4 KiB
XML
<?xml version='1.0' encoding='utf-8'?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: f5a5f5ae75cf140bd3dd65da52b70f6236b0e131 Maintainer: gui Status: ready -->
|
|
<!-- Reviewed: yes -->
|
|
|
|
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="pharfileinfo.getcrc32">
|
|
<refnamediv>
|
|
<refname>PharFileInfo::getCRC32</refname>
|
|
<refpurpose>Retourne le code CRC32 ou soulève une exception si le CRC n'a pas été vérifié</refpurpose>
|
|
</refnamediv>
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<modifier>public</modifier> <type>int</type><methodname>PharFileInfo::getCRC32</methodname>
|
|
<void/>
|
|
</methodsynopsis>
|
|
|
|
<para>
|
|
Retourne la somme de contrôle <function>crc32</function> du fichier au sein
|
|
de l'archive Phar.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
&no.function.parameters;
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
La somme de contrôle <function>crc32</function> du fichier au sein de l'archive Phar.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="errors">
|
|
&reftitle.errors;
|
|
<para>
|
|
Soulève une exception <classname>BadMethodCallException</classname>
|
|
si le CRC32 du fichier n'a pas encore été vérifié. Ceci n'arrive
|
|
normalement pas, car le CRC est vérifié à l'ouverture
|
|
du fichier en lecture ou en écriture.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Exemple avec <function>PharFileInfo::getCRC32</function></title>
|
|
<para>
|
|
</para>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
try {
|
|
$p = new Phar('/chemin/vers/mon.phar', 0, 'mon.phar');
|
|
$p['monfichier.txt'] = 'salut';
|
|
$file = $p['monfichier.txt'];
|
|
echo $file->getCRC32();
|
|
} catch (Exception $e) {
|
|
echo 'L'écriture de mon.phar.phar a échouée : ', $e;
|
|
}
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs;
|
|
<screen>
|
|
<![CDATA[
|
|
3633523372
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</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
|
|
-->
|