<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->

<refentry xml:id="rararchive.getcomment" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
 <refnamediv>
  <refname>RarArchive::getComment</refname>
  <refname>rar_comment_get</refname>
  <refpurpose>Get comment text from the RAR archive</refpurpose>
 </refnamediv>

 <refsect1 role="description">
  &reftitle.description;
  <para>&style.oop; (method):</para>
   <methodsynopsis>
   <modifier>public</modifier> <type>string</type><methodname>RarArchive::getComment</methodname>
   <void />
   </methodsynopsis>
  <para>&style.procedural;:</para>
  <methodsynopsis>
   <type>string</type><methodname>rar_comment_get</methodname>
   <methodparam><type>RarArchive</type><parameter>rarfile</parameter></methodparam>
  </methodsynopsis>
  <para>
   Get the (global) comment stored in the RAR archive. It may be up to 64 KiB long.
  </para>
  <note>
   <para>
    This extension does not support comments at the entry level.
   </para>
  </note>
 </refsect1>

 <refsect1 role="parameters">
  &reftitle.parameters;
  <para>
   <variablelist>
    <varlistentry>
     <term><parameter>rarfile</parameter></term>
     <listitem>
      <para>
       A <type>RarArchive</type> object, opened with <function>rar_open</function>.
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </para>
 </refsect1>

 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   Returns the comment or &null; if there is none.
  </para>
  <note>
    <para>
      RAR has currently no support for unicode comments. The encoding of the
      result of this function is not specified, but it will probably be
      Windows-1252.
    </para>
  </note>
 </refsect1>

 <refsect1 role="examples">
  &reftitle.examples;
  <para>
   <example>
    <title>&style.oop;</title>
    <programlisting role="php">
<![CDATA[
<?php
$rar_arch = RarArchive::open('commented.rar'); 
echo $rar_arch->getComment();
?>
]]>
     </programlisting>
     &example.outputs.similar;
     <screen>
<![CDATA[
This is the comment of the file commented.rar.
]]>
    </screen>
   </example>
  </para>
  <para>
   <example>
    <title>&style.procedural;</title>
    <programlisting role="php">
<![CDATA[
<?php
$rar_arch = rar_open('commented.rar'); 
echo rar_comment_get($rar_arch);
?>
]]>
     </programlisting>
   </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
-->
