Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 10476

php-manual-en-5.5.7-1.mga4.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Get comment text from the RAR archive</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="rararchive.close.html">RarArchive::close</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="rararchive.getentries.html">RarArchive::getEntries</a></div>
 <div class="up"><a href="class.rararchive.html">RarArchive</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="rararchive.getcomment" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">RarArchive::getComment</h1>
  <h1 class="refname">rar_comment_get</h1>
  <p class="verinfo">(PECL rar &gt;= 2.0.0)</p><p class="refpurpose"><span class="refname">RarArchive::getComment</span> -- <span class="refname">rar_comment_get</span> &mdash; <span class="dc-title">Get comment text from the RAR archive</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-rararchive.getcomment-description">
  <h3 class="title">Description</h3>
  <p class="para">Object oriented style (method):</p>
   <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">string</span> <span class="methodname"><strong>RarArchive::getComment</strong></span>
    ( <span class="methodparam">void</span>
    )</div>

  <p class="para rdfs-comment">Procedural style:</p>
  <div class="methodsynopsis dc-description">
   <span class="type">string</span> <span class="methodname"><strong>rar_comment_get</strong></span>
    ( <span class="methodparam"><span class="type"><a href="class.rararchive.html" class="type RarArchive">RarArchive</a></span> <code class="parameter">$rarfile</code></span>
   )</div>

  <p class="para rdfs-comment">
   Get the (global) comment stored in the RAR archive. It may be up to 64 KiB long.
  </p>
  <blockquote class="note"><p><strong class="note">Note</strong>: 
   <p class="para">
    This extension does not support comments at the entry level.
   </p>
  </p></blockquote>
 </div>


 <div class="refsect1 parameters" id="refsect1-rararchive.getcomment-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>

    <dt>

     <span class="term"><em><code class="parameter">rarfile</code></em></span>
     <dd>

      <p class="para">
       A <span class="type"><a href="class.rararchive.html" class="type RarArchive">RarArchive</a></span> object, opened with  <span class="function"><a href="rararchive.open.html" class="function">rar_open()</a></span>.
      </p>
     </dd>

    </dt>

   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-rararchive.getcomment-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns the comment or <strong><code>NULL</code></strong> if there is none.
  </p>
  <blockquote class="note"><p><strong class="note">Note</strong>: 
    <p class="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.
    </p>
  </p></blockquote>
 </div>


 <div class="refsect1 examples" id="refsect1-rararchive.getcomment-examples">
  <h3 class="title">Examples</h3>
  <p class="para">
   <div class="example" id="example-747">
    <p><strong>Example #1 Object oriented style</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$rar_arch&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">RarArchive</span><span style="color: #007700">::</span><span style="color: #0000BB">open</span><span style="color: #007700">(</span><span style="color: #DD0000">'commented.rar'</span><span style="color: #007700">);&nbsp;<br />echo&nbsp;</span><span style="color: #0000BB">$rar_arch</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getComment</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
     </div>

     <div class="example-contents"><p>The above example will output
something similar to:</p></div>
     <div class="example-contents screen">
<div class="cdata"><pre>
This is the comment of the file commented.rar.
</pre></div>
    </div>
   </div>
  </p>
  <p class="para">
   <div class="example" id="example-748">
    <p><strong>Example #2 Procedural style</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$rar_arch&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">rar_open</span><span style="color: #007700">(</span><span style="color: #DD0000">'commented.rar'</span><span style="color: #007700">);&nbsp;<br />echo&nbsp;</span><span style="color: #0000BB">rar_comment_get</span><span style="color: #007700">(</span><span style="color: #0000BB">$rar_arch</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
     </div>

   </div>
  </p>
 </div>



</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="rararchive.close.html">RarArchive::close</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="rararchive.getentries.html">RarArchive::getEntries</a></div>
 <div class="up"><a href="class.rararchive.html">RarArchive</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>