mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-20 19:08:54 +00:00

- Added rar:// wrapper documentation - Other improvements on the rar extension documentation git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@300966 c90b9560-bf6c-de11-be94-00142212c4b1
111 lines
2.4 KiB
XML
111 lines
2.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
|
|
<refentry xml:id="rarentry.getname" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<refnamediv>
|
|
<refname>RarEntry::getName</refname>
|
|
<refpurpose>Get name of the entry</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<modifier>public</modifier> <type>string</type><methodname>RarEntry::getName</methodname>
|
|
<void/>
|
|
</methodsynopsis>
|
|
<para>
|
|
Returns the name (with path) of the archive entry.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
&no.function.parameters;
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Returns the entry name as a string, or &false; on error.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="changelog">
|
|
&reftitle.changelog;
|
|
<para>
|
|
<informaltable>
|
|
<tgroup cols="2">
|
|
<thead>
|
|
<row>
|
|
<entry>&Version;</entry>
|
|
<entry>&Description;</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry>2.0.0</entry>
|
|
<entry>
|
|
As of version 2.0.0, the returned string is encoded in Unicode/UTF-8.
|
|
</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</informaltable>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title><methodname>RarEntry::getName</methodname> example</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
|
|
//this example is safe even in pages not encoded in UTF-8
|
|
//for those encoded in UTF-8, the call to mb_convert_encoding is unnecessary
|
|
|
|
$rar_file = rar_open('example.rar') or die("Failed to open Rar archive");
|
|
|
|
$entry = rar_entry_get($rar_file, 'Dir/file.txt') or die("Failed to find such entry");
|
|
|
|
echo "Entry name: " . mb_convert_encoding(
|
|
htmlentities(
|
|
$entry->getName(),
|
|
ENT_COMPAT,
|
|
"UTF-8"
|
|
),
|
|
"HTML-ENTITIES",
|
|
"UTF-8"
|
|
);
|
|
|
|
?>
|
|
]]>
|
|
</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
|
|
-->
|