mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
MFB: Upgrade to the new-reference-structure
- Split reference.xml into book.xml, setup.xml, constants.xml, and examples.xml - Moved from reference.xml to book.xml: - The intro text (partintro), and link to various pages - Moved from reference.xml to setup.xml: - The rest: requirements, installation, configuration, and resources - Moved from reference.xml to examples.xml: - The examples chapter - Moved from reference.xml to constants.xml: - The constants appendix - Changed the intro ID from <extname>.intro to intro.<extname> git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@248701 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
309a97e4d0
commit
fc6c5b9ff8
5 changed files with 286 additions and 168 deletions
53
reference/rar/book.xml
Normal file
53
reference/rar/book.xml
Normal file
|
@ -0,0 +1,53 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- Purpose: compression -->
|
||||
<!-- Membership: pecl, external -->
|
||||
|
||||
<book xml:id="book.rar" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>RAR</title>
|
||||
|
||||
<!-- {{{ preface -->
|
||||
<preface xml:id="intro.rar">
|
||||
&reftitle.intro;
|
||||
<para>
|
||||
Rar is a powerful and effective archiver created by Eugene Roshal.
|
||||
This extension gives you possibility to read Rar archives but
|
||||
doesn't support writing Rar archives, because this is not supported
|
||||
by UnRar library and is directly prohibited by it's license.
|
||||
</para>
|
||||
<para>
|
||||
More information about Rar and UnRar can be found at <link
|
||||
xlink:href="&url.rar;">&url.rar;</link>.
|
||||
</para>
|
||||
</preface>
|
||||
<!-- }}} -->
|
||||
|
||||
&reference.rar.setup;
|
||||
&reference.rar.constants;
|
||||
&reference.rar.examples;
|
||||
<!-- FIXME: Apparently this extension has some classes -->
|
||||
&reference.rar.reference;
|
||||
|
||||
</book>
|
||||
|
||||
<!-- 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
|
||||
-->
|
||||
|
86
reference/rar/constants.xml
Normal file
86
reference/rar/constants.xml
Normal file
|
@ -0,0 +1,86 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
|
||||
<appendix xml:id="rar.constants" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
&reftitle.constants;
|
||||
&extension.constants;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>RAR_HOST_MSDOS</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>RAR_HOST_OS2</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>RAR_HOST_WIN32</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>RAR_HOST_UNIX</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>RAR_HOST_BEOS</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</appendix>
|
||||
|
||||
<!-- 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
|
||||
-->
|
||||
|
58
reference/rar/examples.xml
Normal file
58
reference/rar/examples.xml
Normal file
|
@ -0,0 +1,58 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
|
||||
<chapter xml:id="rar.examples" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Rar extension overview example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
$rar_file = rar_open('example.rar') or die("Can't open Rar archive");
|
||||
|
||||
$entries = rar_list($rar_file);
|
||||
|
||||
foreach ($entries as $entry) {
|
||||
echo 'Filename: ' . $entry->getName() . "\n";
|
||||
echo 'Packed size: ' . $entry->getPackedSize() . "\n";
|
||||
echo 'Unpacked size: ' . $entry->getUnpackedSize() . "\n";
|
||||
|
||||
$entry->extract('/dir/extract/to/');
|
||||
}
|
||||
|
||||
rar_close($rar_file);
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
This example opens a Rar file archive and extracts each entry to the
|
||||
specified directory.
|
||||
</para>
|
||||
</chapter>
|
||||
|
||||
<!-- 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
|
||||
-->
|
||||
|
|
@ -1,175 +1,13 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.7 $ -->
|
||||
<!-- Purpose: compression -->
|
||||
<!-- Membership: pecl, external -->
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
|
||||
<reference xml:id="ref.rar" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>Rar Functions</title>
|
||||
<titleabbrev>Rar</titleabbrev>
|
||||
<reference xml:id="ref.rar" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>Rar &Functions;</title>
|
||||
<titleabbrev>Rar</titleabbrev>
|
||||
|
||||
<partintro>
|
||||
&reference.rar.entities.functions;
|
||||
|
||||
<section xml:id="rar.intro">
|
||||
&reftitle.intro;
|
||||
<para>
|
||||
RAR is a powerful and effective archiver created by Eugene Roshal.
|
||||
This extension uses unRAR library which implements read-only support
|
||||
for Rar archives.
|
||||
Re-creating a RAR/WinRAR archiver using unRAR sources is prohibited
|
||||
by the unRAR license.
|
||||
</para>
|
||||
<para>
|
||||
More information about RAR and unRAR can be found at <link
|
||||
xlink:href="&url.rar;">&url.rar;</link>.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section xml:id="rar.requirements">
|
||||
&reftitle.required;
|
||||
&no.requirement;
|
||||
</section>
|
||||
|
||||
&reference.rar.ini;
|
||||
|
||||
<section xml:id="rar.install">
|
||||
&reftitle.install;
|
||||
<para>
|
||||
Rar extension is currently available through PECL
|
||||
<link xlink:href="&url.pecl.package;rar">&url.pecl.package;rar</link>.
|
||||
</para>
|
||||
<para>
|
||||
Also you can use the PECL installer to install the Rar extension,
|
||||
using the following command: <command>pecl -v install rar</command>.
|
||||
</para>
|
||||
<para>
|
||||
You can always download the tar.gz package and install Rar by hand:
|
||||
<example>
|
||||
<title>Rar installation</title>
|
||||
<programlisting role="shell">
|
||||
<![CDATA[
|
||||
gunzip rar-xxx.tgz
|
||||
tar -xvf rar-xxx.tar
|
||||
cd rar-xxx
|
||||
phpize
|
||||
./configure && make && make install
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
Windows users can download the extension dll <filename>php_rar.dll</filename>
|
||||
here: <link xlink:href="&url.pecl.get.win;">&url.pecl.get.win;</link>.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section xml:id="rar.resources">
|
||||
&reftitle.resources;
|
||||
<para>
|
||||
There is one resource used in Rar extension: a file descriptor returned
|
||||
by <function>rar_open</function>.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section xml:id="rar.constants">
|
||||
&reftitle.constants;
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>RAR_HOST_MSDOS</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>RAR_HOST_OS2</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>RAR_HOST_WIN32</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>RAR_HOST_UNIX</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>RAR_HOST_BEOS</constant>
|
||||
(<type>integer</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</section>
|
||||
|
||||
<section xml:id="rar.examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Rar extension overview example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
$rar_file = rar_open('example.rar') or die("Can't open Rar archive");
|
||||
|
||||
$entries = rar_list($rar_file);
|
||||
|
||||
foreach ($entries as $entry) {
|
||||
echo 'Filename: ' . $entry->getName() . "\n";
|
||||
echo 'Packed size: ' . $entry->getPackedSize() . "\n";
|
||||
echo 'Unpacked size: ' . $entry->getUnpackedSize() . "\n";
|
||||
|
||||
$entry->extract('/dir/extract/to/');
|
||||
}
|
||||
|
||||
rar_close($rar_file);
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
This example opens a Rar file archive and extracts each entry to the
|
||||
specified directory.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
</partintro>
|
||||
|
||||
&reference.rar.entities.functions;
|
||||
|
||||
</reference>
|
||||
</reference>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
|
83
reference/rar/setup.xml
Normal file
83
reference/rar/setup.xml
Normal file
|
@ -0,0 +1,83 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
|
||||
<chapter xml:id="rar.setup" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
&reftitle.setup;
|
||||
|
||||
<!-- {{{ Requirements -->
|
||||
<section xml:id="rar.requirements">
|
||||
&reftitle.required;
|
||||
&no.requirement;
|
||||
</section>
|
||||
<!-- }}} -->
|
||||
|
||||
<!-- {{{ Installation -->
|
||||
<section xml:id="rar.installation">
|
||||
&reftitle.install;
|
||||
<para>
|
||||
Rar is currently available through PECL
|
||||
<link xlink:href="&url.pecl.package;rar">&url.pecl.package;rar</link>.
|
||||
</para>
|
||||
<para>
|
||||
Also you can use the PECL installer to install the Rar extension,
|
||||
using the following command: <command>pecl -v install rar</command>.
|
||||
</para>
|
||||
<para>
|
||||
You can always download the tar.gz package and install Rar by hand:
|
||||
<example>
|
||||
<title>Rar installation</title>
|
||||
<programlisting role="shell">
|
||||
<![CDATA[
|
||||
gunzip rar-xxx.tgz
|
||||
tar -xvf rar-xxx.tar
|
||||
cd rar-xxx
|
||||
phpize
|
||||
./configure && make && make install
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
Windows users can download the extension dll <filename>php_rar.dll</filename>
|
||||
here: <link xlink:href="&url.pecl.get.win;">&url.pecl.get.win;</link>.
|
||||
</para>
|
||||
</section>
|
||||
<!-- }}} -->
|
||||
|
||||
<!-- {{{ Configuration -->
|
||||
&reference.rar.ini;
|
||||
<!-- }}} -->
|
||||
|
||||
<!-- {{{ Resources -->
|
||||
<section xml:id="rar.resources">
|
||||
&reftitle.resources;
|
||||
<para>
|
||||
There is one resource used in Rar extension: a file descriptor returned
|
||||
by <function>rar_open</function>.
|
||||
</para>
|
||||
</section>
|
||||
<!-- }}} -->
|
||||
|
||||
</chapter>
|
||||
|
||||
<!-- 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
|
||||
-->
|
||||
|
Loading…
Reference in a new issue