1
0
mirror of https://github.com/php/doc-es.git synced 2026-04-25 16:18:09 +02:00
Files
archived-doc-es/reference/phar/PharFileInfo/getCRC32.xml
T
Pedro Antonio Gil Rodríguez e2ea885dc4 Actualizacion a la ultima version
git-svn-id: https://svn.php.net/repository/phpdoc/es/trunk@330803 c90b9560-bf6c-de11-be94-00142212c4b1
2013-07-08 21:17:45 +00:00

92 lines
2.3 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 656d1610af1a960d87c8b7056e54d0d4c75fb123 Maintainer: seros Status: ready -->
<!-- Reviewed: no -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="pharfileinfo.getcrc32">
<refnamediv>
<refname>PharFileInfo::getCRC32</refname>
<refpurpose>Devolver el códido CRC32 o lanzar una exepción si la CRC no ha sido verificado</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>int</type><methodname>PharFileInfo::getCRC32</methodname>
<void/>
</methodsynopsis>
<para>
Este método devuelve la suma de verificación <function>crc32</function> del fichero
dentro de un archivo Phar.
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
La suma de verificaicón <function>crc32</function> de un fichero dentro de un archivo Phar.
</para>
</refsect1>
<refsect1 role="errors">
&reftitle.errors;
<para>
Lanza una excepción de tipo <classname>BadMethodCallException</classname> si el fichero no tiene aún
su CRC32 verificado. Esto sería imposible con un uso normal, ya que
la CRC es verificada al abrir el fichero para lectura o escritura.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Un ejemplo de <function>PharFileInfo::getCRC32</function></title>
<para>
</para>
<programlisting role="php">
<![CDATA[
<?php
try {
$p = new Phar('/ruta/a/mi.phar', 0, 'mi.phar');
$p['mifichero.txt'] = 'hola';
$fichero = $p['mifichero.txt'];
echo $fichero->getCRC32();
} catch (Exception $e) {
echo 'Las operaciones de escritura sobre mi.phar.phar fallaron: ', $e;
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
1872820616
]]>
</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
-->