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
119 lines
3.3 KiB
XML
119 lines
3.3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 656d1610af1a960d87c8b7056e54d0d4c75fb123 Maintainer: seros Status: ready -->
|
|
<!-- Reviewed: no -->
|
|
<refentry xml:id="pharfileinfo.delmetadata" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<refnamediv>
|
|
<refname>PharFileInfo::delMetadata</refname>
|
|
<refpurpose>Eliminar la metainformación de una entrada</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<modifier>public</modifier> <type>bool</type><methodname>PharFileInfo::delMetadata</methodname>
|
|
<void/>
|
|
</methodsynopsis>
|
|
<para>
|
|
Eliminar la metainformación de una entrada, si existe.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
No parameters.
|
|
</para>
|
|
|
|
</refsect1>
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Devuelve &true; en caso de éxito, &false; si la entrada no tiene metainformación.
|
|
Al igual que con toda la funcionalidad que modifica el contenido de
|
|
un Phar, la variable INI <link linkend="ini.phar.readonly">phar.readonly</link>
|
|
debe estar desactivada para poder realizar esto si el fichero está dentro de un archivo
|
|
<classname>Phar</classname>. Los ficheros dentro de archivos <classname>PharData</classname> no tienen
|
|
esta restricción.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="errors">
|
|
&reftitle.errors;
|
|
<para>
|
|
Lanza una excepción de tipo <classname>PharException</classname> si ocurrió algún error al volcar
|
|
los cambios al disco, y una excepción de tipo <classname>BadMethodCallException</classname> si
|
|
el acceso a escritura está deshabilitado.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Un ejemplo de <function>PharFileInfo::delMetaData</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
try {
|
|
$a = new Phar('miphar.phar');
|
|
$a['hola'] = 'hola';
|
|
var_dump($a['hola']->delMetadata());
|
|
$a['hola']->setMetadata('qué tal');
|
|
var_dump($a['hola']->delMetadata());
|
|
var_dump($a['hola']->delMetadata());
|
|
} catch (Exception $e) {
|
|
// manejar errores
|
|
}
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs;
|
|
<screen>
|
|
<![CDATA[
|
|
bool(false)
|
|
bool(true)
|
|
bool(false)
|
|
]]>
|
|
</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::getMetadata</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
|
|
-->
|