php-doc-en/reference/zip/functions/ziparchive-getcommentindex.xml
Jakub Vrana 5fd0e106b0 Fix synopsis types
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@218134 c90b9560-bf6c-de11-be94-00142212c4b1
2006-08-14 13:12:56 +00:00

89 lines
2.2 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<refentry id="function.ziparchive-getcommentindex">
<refnamediv>
<refname>ZipArchive::getCommentIndex</refname>
<refpurpose>Returns the comment of an entry using the entry index</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>ZipArchive::getCommentIndex</methodname>
<methodparam><type>int</type><parameter>index</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>flags</parameter></methodparam>
</methodsynopsis>
<para>
Returns the comment of an entry using the entry index.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>index</parameter></term>
<listitem>
<para>
Index of the entry
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>flags</parameter></term>
<listitem>
<para>
If flags is set to <constant>ZIPARCHIVE::FL_UNCHANGED</constant>, the original unchanged
comment is returned.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns the comment on success or &false; on failure.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<example>
<title>Dump an entry comment</title>
<programlisting role="php">
<![CDATA[
<?php
$zip = new ZipArchive;
$res = $zip->open('test1.zip')
if ($res === TRUE) {
var_dump($zip->getCommentIndex(1));
} else {
echo 'failed, code:' . $res;
}
?>
]]>
</programlisting>
</example>
</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:"../../../../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
-->