mirror of
https://github.com/php/doc-es.git
synced 2026-03-26 08:22:08 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/es/trunk@330803 c90b9560-bf6c-de11-be94-00142212c4b1
109 lines
2.9 KiB
XML
109 lines
2.9 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.getmetadata">
|
|
<refnamediv>
|
|
<refname>PharFileInfo::getMetadata</refname>
|
|
<refpurpose>Devolver la metainformación específica de un fichero almacenada con un fichero</refpurpose>
|
|
</refnamediv>
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<modifier>public</modifier> <type>mixed</type><methodname>PharFileInfo::getMetadata</methodname>
|
|
<void/>
|
|
</methodsynopsis>
|
|
|
|
<para>
|
|
Devuelve la metainformación que fue almacenada en el manifiesto del archivo Phar para este fichero.
|
|
</para>
|
|
|
|
</refsect1>
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Cualquier variable de PHP que pueda ser serializada y almacenada como metainformación del fichero,
|
|
o &null; si no hay metainformación almacenada.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Un ejemplo de <function>PharFileInfo::getMetadata</function></title>
|
|
<para>
|
|
</para>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
// asegurarse de que no existe
|
|
@unlink('nuevo_phar.phar');
|
|
try {
|
|
$p = new Phar(dirname(__FILE__) . '/nuevo_phar.phar', 0, 'nuevo_phar.phar');
|
|
$p['fichero.txt'] = 'hello';
|
|
$p['fichero.txt']->setMetadata(array('usuario' => 'bill', 'tipo-mime' => 'text/plain'));
|
|
var_dump($p['fichero.txt']->getMetadata());
|
|
} catch (Exception $e) {
|
|
echo 'No se pudo crear y/o modificar nuevo_phar.phar:', $e;
|
|
}
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs;
|
|
<screen>
|
|
<![CDATA[
|
|
array(2) {
|
|
["usuario"]=>
|
|
string(4) "bill"
|
|
["tipo-mime"]=>
|
|
string(10) "text/plain"
|
|
}
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>PharFileInfo::setMetadata</function></member>
|
|
<member><function>PharFileInfo::hasMetadata</function></member>
|
|
<member><function>PharFileInfo::delMetadata</function></member>
|
|
<member><function>Phar::setMetadata</function></member>
|
|
<member><function>Phar::hasMetadata</function></member>
|
|
<member><function>Phar::getMetadata</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
|
|
-->
|