Generate ext/phar methodsynopsis based on stubs

Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>

Closes GH-626.
This commit is contained in:
Máté Kocsis 2021-05-23 19:38:16 +02:00 committed by Christoph M. Becker
parent 9fb30ae957
commit 28046efaba
No known key found for this signature in database
GPG key ID: D66C9593118BCCB6
56 changed files with 665 additions and 270 deletions

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="phar.addemptydir">
<refentry xml:id="phar.addemptydir" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>Phar::addEmptyDir</refname>
<refpurpose>Add an empty directory to the phar archive</refpurpose>
@ -9,7 +9,7 @@
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>void</type><methodname>Phar::addEmptyDir</methodname>
<methodparam><type>string</type><parameter>dirname</parameter></methodparam>
<methodparam><type>string</type><parameter>directory</parameter></methodparam>
</methodsynopsis>
&phar.write;
@ -24,7 +24,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>dirname</parameter></term>
<term><parameter>directory</parameter></term>
<listitem>
<para>
The name of the empty directory to create in the phar archive
@ -79,7 +79,6 @@ try {
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="phar.addfile">
<refentry xml:id="phar.addfile" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>Phar::addFile</refname>
<refpurpose>Add a file from the filesystem to the phar archive</refpurpose>
@ -9,14 +9,14 @@
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>void</type><methodname>Phar::addFile</methodname>
<methodparam><type>string</type><parameter>file</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>localname</parameter></methodparam>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>localName</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
&phar.write;
<para>
With this method, any file or URL can be added to the phar archive. If
the optional second parameter <literal>localname</literal> is specified,
the optional second parameter <literal>localname</literal> is a &string;,
the file will be stored in the archive with that name, otherwise the
<literal>file</literal> parameter is used as the path to store within
the archive. URLs must have a localname or an exception is thrown.
@ -29,7 +29,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>file</parameter></term>
<term><parameter>filename</parameter></term>
<listitem>
<para>
Full or relative path to a file on disk to be added
@ -38,7 +38,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>localname</parameter></term>
<term><parameter>localName</parameter></term>
<listitem>
<para>
Path that the file will be stored in the archive.
@ -56,6 +56,28 @@
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.0.0</entry>
<entry>
<parameter>localName</parameter> is now nullable.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
@ -105,7 +127,6 @@ try {
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="phar.addfromstring">
<refentry xml:id="phar.addfromstring" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>Phar::addFromString</refname>
<refpurpose>Add a file from a string to the phar archive</refpurpose>
@ -9,7 +9,7 @@
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>void</type><methodname>Phar::addFromString</methodname>
<methodparam><type>string</type><parameter>localname</parameter></methodparam>
<methodparam><type>string</type><parameter>localName</parameter></methodparam>
<methodparam><type>string</type><parameter>contents</parameter></methodparam>
</methodsynopsis>
&phar.write;
@ -26,7 +26,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>localname</parameter></term>
<term><parameter>localName</parameter></term>
<listitem>
<para>
Path that the file will be stored in the archive.
@ -99,7 +99,6 @@ try {
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -9,9 +9,9 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>array</type><methodname>Phar::buildFromDirectory</methodname>
<methodparam><type>string</type><parameter>base_dir</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>regex</parameter></methodparam>
<modifier>public</modifier> <type class="union"><type>array</type><type>false</type></type><methodname>Phar::buildFromDirectory</methodname>
<methodparam><type>string</type><parameter>directory</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>pattern</parameter><initializer>""</initializer></methodparam>
</methodsynopsis>
&phar.write;
<para>
@ -27,7 +27,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>base_dir</parameter></term>
<term><parameter>directory</parameter></term>
<listitem>
<para>
The full or relative path to the directory that contains all files
@ -36,7 +36,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>regex</parameter></term>
<term><parameter>pattern</parameter></term>
<listitem>
<para>
An optional pcre regular expression that is used to filter the
@ -54,7 +54,7 @@
<para>
<function>Phar::buildFromDirectory</function> returns an associative array
mapping internal path of file to the full path of the file on the
filesystem.
filesystem, &return.falseforfailure;.
</para>
</refsect1>
@ -106,7 +106,6 @@ $phar2->setStub($phar->createDefaultStub('cli/index.php', 'www/index.php'));
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -9,9 +9,9 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>array</type><methodname>Phar::buildFromIterator</methodname>
<methodparam><type>Iterator</type><parameter>iter</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>base_directory</parameter></methodparam>
<modifier>public</modifier> <type class="union"><type>array</type><type>false</type></type><methodname>Phar::buildFromIterator</methodname>
<methodparam><type>Traversable</type><parameter>iterator</parameter></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>baseDirectory</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
&phar.write;
<para>
@ -28,7 +28,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>iter</parameter></term>
<term><parameter>iterator</parameter></term>
<listitem>
<para>
Any iterator that either associatively maps phar file to location or
@ -37,7 +37,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>base_directory</parameter></term>
<term><parameter>baseDirectory</parameter></term>
<listitem>
<para>
For iterators that return SplFileInfo objects, the portion of each
@ -54,7 +54,7 @@
<para>
<function>Phar::buildFromIterator</function> returns an associative array
mapping internal path of file to the full path of the file on the
filesystem.
filesystem, &return.falseforfailure;.
</para>
</refsect1>
@ -70,6 +70,28 @@
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.0.0</entry>
<entry>
<parameter>baseDirectory</parameter> is now nullable.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<example>
@ -146,7 +168,7 @@ $phar->setStub($phar->createDefaultStub('cli/index.php', 'www/index.php'));
<title>A <function>Phar::buildFromIterator</function> with other iterators</title>
<para>
The second form of the iterator can be used with any iterator that returns
a key => value mapping, such as an <classname>ArrayIterator</classname>:
a key =&gt; value mapping, such as an <classname>ArrayIterator</classname>:
</para>
<para>
<programlisting role="php">
@ -178,7 +200,6 @@ $phar->setStub($phar->createDefaultStub('cli/index.php', 'www/index.php'));
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="phar.cancompress">
<refentry xml:id="phar.cancompress" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>Phar::canCompress</refname>
<refpurpose>Returns whether phar extension supports compression using either zlib or bzip2</refpurpose>
@ -9,7 +9,7 @@
&reftitle.description;
<methodsynopsis>
<modifier>final</modifier> <modifier>public</modifier> <modifier>static</modifier> <type>bool</type><methodname>Phar::canCompress</methodname>
<methodparam choice="opt"><type>int</type><parameter>type</parameter><initializer>0</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter>compression</parameter><initializer>0</initializer></methodparam>
</methodsynopsis>
<para>
@ -23,7 +23,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>type</parameter></term>
<term><parameter>compression</parameter></term>
<listitem>
<para>
Either <literal>Phar::GZ</literal> or <literal>Phar::BZ2</literal> can be
@ -82,7 +82,6 @@ if (Phar::canCompress()) {
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="phar.compress">
<refentry xml:id="phar.compress" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>Phar::compress</refname>
<refpurpose>Compresses the entire Phar archive using Gzip or Bzip2 compression</refpurpose>
@ -9,9 +9,9 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>Phar</type><methodname>Phar::compress</methodname>
<modifier>public</modifier> <type class="union"><type>Phar</type><type>null</type></type><methodname>Phar::compress</methodname>
<methodparam><type>int</type><parameter>compression</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>extension</parameter></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>extension</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
&phar.write;
@ -71,7 +71,7 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns a <classname>Phar</classname> object.
Returns a <classname>Phar</classname> object, or &null; on failure.
</para>
</refsect1>
@ -86,6 +86,28 @@
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.0.0</entry>
<entry>
<parameter>extension</parameter> is now nullable.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
@ -127,7 +149,6 @@ $p3 = $p2->compress(Phar::NONE); // exception: /path/to/my.phar already exists
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -7,12 +7,12 @@
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<constructorsynopsis>
<modifier>public</modifier> <methodname>Phar::__construct</methodname>
<methodparam><type>string</type><parameter>fname</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>flags</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>alias</parameter></methodparam>
</methodsynopsis>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer>FilesystemIterator::SKIP_DOTS | FilesystemIterator::UNIX_PATHS</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>alias</parameter><initializer>&null;</initializer></methodparam>
</constructorsynopsis>
</refsect1>
<refsect1 role="parameters">
@ -20,7 +20,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>fname</parameter></term>
<term><parameter>filename</parameter></term>
<listitem>
<para>
Path to an existing Phar archive or to-be-created archive. The file name's
@ -88,7 +88,6 @@ echo file_get_contents('phar:///path/to/my.phar/example.txt');
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -10,10 +10,10 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>PharData</type><methodname>Phar::convertToData</methodname>
<methodparam choice="opt"><type>int</type><parameter>format</parameter><initializer>9021976</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter>compression</parameter><initializer>9021976</initializer></methodparam>
<methodparam choice="opt"><type>string</type><parameter>extension</parameter></methodparam>
<modifier>public</modifier> <type class="union"><type>Phar</type><type>null</type></type><methodname>Phar::convertToData</methodname>
<methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>format</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>compression</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>extension</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>
@ -81,8 +81,8 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
The method returns a <classname>PharData</classname> object on success and throws an
exception on failure.
The method returns a <classname>PharData</classname> object on success,
or &null; on failure.
</para>
</refsect1>
@ -98,6 +98,28 @@
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.0.0</entry>
<entry>
<parameter>format</parameter>, <parameter>compression</parameter>, and <parameter>extension</parameter> are now nullable.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
@ -143,7 +165,6 @@ try {
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -10,10 +10,10 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>Phar</type><methodname>Phar::convertToExecutable</methodname>
<methodparam choice="opt"><type>int</type><parameter>format</parameter><initializer>9021976</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter>compression</parameter><initializer>9021976</initializer></methodparam>
<methodparam choice="opt"><type>string</type><parameter>extension</parameter></methodparam>
<modifier>public</modifier> <type class="union"><type>Phar</type><type>null</type></type><methodname>Phar::convertToExecutable</methodname>
<methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>format</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>compression</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>extension</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
&phar.write;
<para>
@ -83,8 +83,8 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
The method returns a <classname>Phar</classname> object on success and throws an
exception on failure.
The method returns a <classname>Phar</classname> object on success,
or &null; on failure.
</para>
</refsect1>
@ -101,6 +101,28 @@
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.0.0</entry>
<entry>
<parameter>format</parameter>, <parameter>compression</parameter>, and <parameter>localName</parameter> are now nullable.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
@ -142,7 +164,6 @@ try {
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -10,8 +10,8 @@
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>bool</type><methodname>Phar::copy</methodname>
<methodparam><type>string</type><parameter>oldfile</parameter></methodparam>
<methodparam><type>string</type><parameter>newfile</parameter></methodparam>
<methodparam><type>string</type><parameter>to</parameter></methodparam>
<methodparam><type>string</type><parameter>from</parameter></methodparam>
</methodsynopsis>
&phar.write;
@ -27,14 +27,14 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>oldfile</parameter></term>
<term><parameter>to</parameter></term>
<listitem>
<para>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>newfile</parameter></term>
<term><parameter>from</parameter></term>
<listitem>
<para>
</para>
@ -97,7 +97,6 @@ echo file_get_contents('phar://myphar.phar/c'); // outputs "hi"
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="phar.count">
<refentry xml:id="phar.count" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>Phar::count</refname>
<refpurpose>Returns the number of entries (files) in the Phar archive</refpurpose>
@ -9,7 +9,7 @@
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>int</type><methodname>Phar::count</methodname>
<void/>
<methodparam choice="opt"><type>int</type><parameter>mode</parameter><initializer><constant>COUNT_NORMAL</constant></initializer></methodparam>
</methodsynopsis>
<para>
@ -64,7 +64,6 @@ The new phar has 1 entries
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="phar.createdefaultstub">
<refentry xml:id="phar.createdefaultstub" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>Phar::createDefaultStub</refname>
<refpurpose>Create a phar-file format specific stub</refpurpose>
@ -9,8 +9,8 @@
&reftitle.description;
<methodsynopsis>
<modifier>final</modifier> <modifier>public</modifier> <modifier>static</modifier> <type>string</type><methodname>Phar::createDefaultStub</methodname>
<methodparam choice="opt"><type>string</type><parameter>index</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>webIndex</parameter></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>index</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>webIndex</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>
@ -89,6 +89,28 @@ php myphar.phar
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.0.0</entry>
<entry>
<parameter>index</parameter> and <parameter>webIndex</parameter> are now nullable.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
@ -122,7 +144,6 @@ try {
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="phar.decompress">
<refentry xml:id="phar.decompress" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>Phar::decompress</refname>
<refpurpose>Decompresses the entire Phar archive</refpurpose>
@ -9,8 +9,8 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>Phar</type><methodname>Phar::decompress</methodname>
<methodparam choice="opt"><type>string</type><parameter>extension</parameter></methodparam>
<modifier>public</modifier> <type class="union"><type>Phar</type><type>null</type></type><methodname>Phar::decompress</methodname>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>extension</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
&phar.write;
@ -60,7 +60,7 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
A <classname>Phar</classname> object is returned.
A <classname>Phar</classname> object is returned on success, and &null; on failure.
</para>
</refsect1>
@ -75,6 +75,28 @@
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.0.0</entry>
<entry>
<parameter>extension</parameter> is now nullable.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
@ -114,7 +136,6 @@ $p3 = $p2->decompress(); // creates /path/to/my.phar
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -10,7 +10,7 @@
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>bool</type><methodname>Phar::delete</methodname>
<methodparam><type>string</type><parameter>entry</parameter></methodparam>
<methodparam><type>string</type><parameter>localName</parameter></methodparam>
</methodsynopsis>
&phar.write;
@ -26,7 +26,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>entry</parameter></term>
<term><parameter>localName</parameter></term>
<listitem>
<para>
Path within an archive to the file to delete.
@ -88,7 +88,6 @@ try {
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -10,8 +10,8 @@
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>bool</type><methodname>Phar::extractTo</methodname>
<methodparam><type>string</type><parameter>pathto</parameter></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>array</type><type>null</type></type><parameter>files</parameter><initializer>&null;</initializer></methodparam>
<methodparam><type>string</type><parameter>directory</parameter></methodparam>
<methodparam choice="opt"><type class="union"><type>array</type><type>string</type><type>null</type></type><parameter>files</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>overwrite</parameter><initializer>&false;</initializer></methodparam>
</methodsynopsis>
@ -32,7 +32,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>pathto</parameter></term>
<term><parameter>directory</parameter></term>
<listitem>
<para>
Path to extract the given <parameter>files</parameter> to
@ -112,7 +112,6 @@ try {
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="phar.getalias" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Phar::getAlias</refname>
@ -10,8 +9,8 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>string</type><methodname>Phar::getAlias</methodname>
<void />
<modifier>public</modifier> <type class="union"><type>string</type><type>null</type></type><methodname>Phar::getAlias</methodname>
<void/>
</methodsynopsis>
<para>
@ -35,7 +34,6 @@
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="phar.getmetadata">
<refentry xml:id="phar.getmetadata" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>Phar::getMetadata</refname>
<refpurpose>Returns phar archive meta-data</refpurpose>
@ -9,7 +9,7 @@
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>mixed</type><methodname>Phar::getMetadata</methodname>
<void/>
<methodparam choice="opt"><type>array</type><parameter>unserializeOptions</parameter><initializer>[]</initializer></methodparam>
</methodsynopsis>
<para>
@ -26,7 +26,7 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
any PHP variable that can be serialized and is stored as meta-data for the Phar archive,
Any PHP value that can be serialized and is stored as meta-data for the Phar archive,
or &null; if no meta-data is stored.
</para>
</refsect1>
@ -79,7 +79,6 @@ array(1) {
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="phar.getsignature">
<refentry xml:id="phar.getsignature" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>Phar::getSignature</refname>
<refpurpose>Return MD5/SHA1/SHA256/SHA512/OpenSSL signature of a Phar archive</refpurpose>
@ -8,7 +8,7 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>array</type><methodname>Phar::getSignature</methodname>
<modifier>public</modifier> <type class="union"><type>array</type><type>false</type></type><methodname>Phar::getSignature</methodname>
<void/>
</methodsynopsis>
@ -33,12 +33,12 @@
A valid signature is absolutely required of all executable phar archives if the
<link linkend="ini.phar.require-hash">phar.require_hash</link> INI variable
is set to true.
If there is no signature, the function returns &false;.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -9,7 +9,7 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>mixed</type><methodname>Phar::isCompressed</methodname>
<modifier>public</modifier> <type class="union"><type>int</type><type>false</type></type><methodname>Phar::isCompressed</methodname>
<void/>
</methodsynopsis>
&phar.write;
@ -31,7 +31,7 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
<literal>Phar::GZ</literal>, <literal>Phar::BZ2</literal> or &false;
<literal>Phar::GZ</literal>, <literal>Phar::BZ2</literal> or &false;.
</para>
</refsect1>
@ -86,7 +86,6 @@ bool(true)
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="phar.loadphar">
<refentry xml:id="phar.loadphar" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>Phar::loadPhar</refname>
<refpurpose>Loads any phar archive with an alias</refpurpose>
@ -10,7 +10,7 @@
<methodsynopsis>
<modifier>final</modifier> <modifier>public</modifier> <modifier>static</modifier> <type>bool</type><methodname>Phar::loadPhar</methodname>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>alias</parameter></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>alias</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>
@ -97,7 +97,6 @@ try {
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="phar.mapphar">
<refentry xml:id="phar.mapphar" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>Phar::mapPhar</refname>
<refpurpose>Reads the currently executed file (a phar) and registers its manifest</refpurpose>
@ -9,8 +9,8 @@
&reftitle.description;
<methodsynopsis>
<modifier>final</modifier> <modifier>public</modifier> <modifier>static</modifier> <type>bool</type><methodname>Phar::mapPhar</methodname>
<methodparam choice="opt"><type>string</type><parameter>alias</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>dataoffset</parameter><initializer>0</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>alias</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter>offset</parameter><initializer>0</initializer></methodparam>
</methodsynopsis>
<para>
@ -34,7 +34,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>dataoffset</parameter></term>
<term><parameter>offset</parameter></term>
<listitem>
<para>
Unused variable, here for compatibility with PEAR's PHP_Archive.
@ -104,7 +104,6 @@ __HALT_COMPILER();
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -10,8 +10,8 @@
&reftitle.description;
<methodsynopsis>
<modifier>final</modifier> <modifier>public</modifier> <modifier>static</modifier> <type>void</type><methodname>Phar::mount</methodname>
<methodparam><type>string</type><parameter>pharpath</parameter></methodparam>
<methodparam><type>string</type><parameter>externalpath</parameter></methodparam>
<methodparam><type>string</type><parameter>pharPath</parameter></methodparam>
<methodparam><type>string</type><parameter>externalPath</parameter></methodparam>
</methodsynopsis>
<para>
Much like the unix file system concept of mounting external devices to paths within the
@ -27,7 +27,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>pharpath</parameter></term>
<term><parameter>pharPath</parameter></term>
<listitem>
<para>
The internal path within the phar archive to use as the mounted path location.
@ -36,7 +36,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>externalpath</parameter></term>
<term><parameter>externalPath</parameter></term>
<listitem>
<para>
A path or URL to an external file or directory to mount within the phar archive
@ -137,7 +137,6 @@ include '/path/to/archive.phar';
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -10,7 +10,7 @@
&reftitle.description;
<methodsynopsis>
<modifier>final</modifier> <modifier>public</modifier> <modifier>static</modifier> <type>void</type><methodname>Phar::mungServer</methodname>
<methodparam><type>array</type><parameter>munglist</parameter></methodparam>
<methodparam><type>array</type><parameter>variables</parameter></methodparam>
</methodsynopsis>
<para>
<function>Phar::mungServer</function> should only be called within the
@ -42,7 +42,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>munglist</parameter></term>
<term><parameter>variables</parameter></term>
<listitem>
<para>
an array containing as string indices any of
@ -102,7 +102,6 @@ __HALT_COMPILER();
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="phar.offsetexists">
<refentry xml:id="phar.offsetexists" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>Phar::offsetExists</refname>
<refpurpose>Determines whether a file exists in the phar</refpurpose>
@ -9,7 +9,7 @@
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>bool</type><methodname>Phar::offsetExists</methodname>
<methodparam><type>string</type><parameter>offset</parameter></methodparam>
<methodparam><type>string</type><parameter>localName</parameter></methodparam>
</methodsynopsis>
<para>
This is an implementation of the <interfacename>ArrayAccess</interfacename> interface allowing
@ -26,7 +26,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>offset</parameter></term>
<term><parameter>localName</parameter></term>
<listitem>
<para>
The filename (relative path) to look for in a Phar.
@ -83,7 +83,6 @@ bool(false)
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="phar.offsetget">
<refentry xml:id="phar.offsetget" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>Phar::offsetGet</refname>
<refpurpose>Gets a <classname>PharFileInfo</classname> object for a specific file</refpurpose>
@ -9,7 +9,7 @@
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>PharFileInfo</type><methodname>Phar::offsetGet</methodname>
<methodparam><type>string</type><parameter>offset</parameter></methodparam>
<methodparam><type>string</type><parameter>localName</parameter></methodparam>
</methodsynopsis>
<para>
@ -25,7 +25,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>offset</parameter></term>
<term><parameter>localName</parameter></term>
<listitem>
<para>
The filename (relative path) to look for in a Phar.
@ -99,7 +99,6 @@ Entry doesnotexist.txt does not exist
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="phar.offsetset">
<refentry xml:id="phar.offsetset" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>Phar::offsetSet</refname>
<refpurpose>Set the contents of an internal file to those of an external file</refpurpose>
@ -9,8 +9,8 @@
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>void</type><methodname>Phar::offsetSet</methodname>
<methodparam><type>string</type><parameter>offset</parameter></methodparam>
<methodparam><type>string</type><parameter>value</parameter></methodparam>
<methodparam><type>string</type><parameter>localName</parameter></methodparam>
<methodparam><type class="union"><type>resource</type><type>string</type></type><parameter>value</parameter></methodparam>
</methodsynopsis>
&phar.write;
@ -28,7 +28,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>offset</parameter></term>
<term><parameter>localName</parameter></term>
<listitem>
<para>
The filename (relative path) to modify in a Phar.
@ -108,7 +108,6 @@ try {
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="phar.offsetunset">
<refentry xml:id="phar.offsetunset" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>Phar::offsetUnset</refname>
<refpurpose>Remove a file from a phar</refpurpose>
@ -9,7 +9,7 @@
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>bool</type><methodname>Phar::offsetUnset</methodname>
<methodparam><type>string</type><parameter>offset</parameter></methodparam>
<methodparam><type>string</type><parameter>localName</parameter></methodparam>
</methodsynopsis>
&phar.write;
@ -29,7 +29,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>offset</parameter></term>
<term><parameter>localName</parameter></term>
<listitem>
<para>
The filename (relative path) to modify in a Phar.
@ -94,7 +94,6 @@ try {
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -10,7 +10,7 @@
&reftitle.description;
<methodsynopsis>
<modifier>final</modifier> <modifier>public</modifier> <modifier>static</modifier> <type>string</type><methodname>Phar::running</methodname>
<methodparam choice="opt"><type>bool</type><parameter>retphar</parameter><initializer>&true;</initializer></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>returnPhar</parameter><initializer>&true;</initializer></methodparam>
</methodsynopsis>
<para>
@ -30,7 +30,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>retphar</parameter></term>
<term><parameter>returnPhar</parameter></term>
<listitem>
<para>
If &false;, the full path on disk to the phar
@ -71,7 +71,6 @@ $b = Phar::running(false); // $b is "/path/to/my.phar"
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="phar.setdefaultstub">
<refentry xml:id="phar.setdefaultstub" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>Phar::setDefaultStub</refname>
<refpurpose>Used to set the PHP loader or bootstrap stub of a Phar archive to the default loader</refpurpose>
@ -9,8 +9,8 @@
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>bool</type><methodname>Phar::setDefaultStub</methodname>
<methodparam choice="opt"><type>string</type><parameter>index</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>webindex</parameter></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>index</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>webIndex</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
&phar.write;
<para>
@ -32,7 +32,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>webindex</parameter></term>
<term><parameter>webIndex</parameter></term>
<listitem>
<para>
Relative path within the phar archive to run if accessed through a web browser
@ -61,6 +61,28 @@
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.0.0</entry>
<entry>
<parameter>webIndex</parameter> is nullable now.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
@ -97,7 +119,6 @@ try {
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -10,8 +10,8 @@
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>void</type><methodname>Phar::setSignatureAlgorithm</methodname>
<methodparam><type>int</type><parameter>sigtype</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>privatekey</parameter></methodparam>
<methodparam><type>int</type><parameter>algo</parameter></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>privateKey</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
&phar.write;
@ -35,7 +35,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>sigtype</parameter></term>
<term><parameter>algo</parameter></term>
<listitem>
<para>
One of <literal>Phar::MD5</literal>,
@ -45,7 +45,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>privatekey</parameter></term>
<term><parameter>privateKey</parameter></term>
<listitem>
<para>
The contents of an OpenSSL private key, as extracted from a certificate or
@ -76,7 +76,7 @@ $p->setSignatureAlgorithm(Phar::OPENSSL, $pkey);
&return.void;
</para>
</refsect1>
<refsect1 role="errors">
&reftitle.errors;
<para>
@ -86,6 +86,28 @@ $p->setSignatureAlgorithm(Phar::OPENSSL, $pkey);
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.0.0</entry>
<entry>
<parameter>privateKey</parameter> is now nullable.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
@ -97,7 +119,6 @@ $p->setSignatureAlgorithm(Phar::OPENSSL, $pkey);
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -10,7 +10,7 @@
&reftitle.description;
<methodsynopsis>
<modifier>final</modifier> <modifier>public</modifier> <modifier>static</modifier> <type>bool</type><methodname>Phar::unlinkArchive</methodname>
<methodparam><type>string</type><parameter>archive</parameter></methodparam>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
</methodsynopsis>
<para>
Removes a phar archive from disk and memory.
@ -22,7 +22,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>archive</parameter></term>
<term><parameter>filename</parameter></term>
<listitem>
<para>
The path on disk to the phar archive.
@ -89,7 +89,6 @@ Phar::unlinkArchive('my.phar');
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -10,11 +10,11 @@
&reftitle.description;
<methodsynopsis>
<modifier>final</modifier> <modifier>public</modifier> <modifier>static</modifier> <type>void</type><methodname>Phar::webPhar</methodname>
<methodparam choice="opt"><type>string</type><parameter>alias</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>index</parameter><initializer>"index.php"</initializer></methodparam>
<methodparam choice="opt"><type>string</type><parameter>f404</parameter></methodparam>
<methodparam choice="opt"><type>array</type><parameter>mimetypes</parameter></methodparam>
<methodparam choice="opt"><type>callable</type><parameter>rewrites</parameter></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>alias</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>index</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>fileNotFoundScript</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type>array</type><parameter>mimeTypes</parameter><initializer>[]</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>callable</type><type>null</type></type><parameter>rewrite</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>
<function>Phar::webPhar</function> serves as <function>Phar::mapPhar</function> for
@ -54,7 +54,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>f404</parameter></term>
<term><parameter>fileNotFoundScript</parameter></term>
<listitem>
<para>
The location of the script to run when a file is not found. This
@ -63,7 +63,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>mimetypes</parameter></term>
<term><parameter>mimeTypes</parameter></term>
<listitem>
<para>
An array mapping additional file extensions to MIME type.
@ -121,7 +121,7 @@ $mimes = array(
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>rewrites</parameter></term>
<term><parameter>rewrite</parameter></term>
<listitem>
<para>
The rewrites function is passed a string as its only parameter and must return a <type>string</type> or &false;.
@ -154,11 +154,34 @@ $mimes = array(
Throws <classname>PharException</classname> when unable to open the internal
file to output, or if
called from a non-stub. If an invalid array value is passed into
<parameter>mimetypes</parameter> or an invalid callback is passed into <parameter>rewrites</parameter>, then
<parameter>mimeTypes</parameter> or an invalid callback is passed into <parameter>rewrite</parameter>, then
<classname>UnexpectedValueException</classname> is thrown.
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.0.0</entry>
<entry>
<parameter>fileNotFoundScript</parameter>, <parameter>mimeTypes</parameter>
and <parameter>rewrite</parameter> are nullable now.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
@ -202,7 +225,6 @@ __HALT_COMPILER(); ?>');
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -53,8 +53,11 @@
</xi:include>
<classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.phardata')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[1])">
<xi:fallback/>
</xi:include>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.phardata')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" />
</classsynopsis>
<!-- }}} -->

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="phardata.addemptydir">
<refentry xml:id="phardata.addemptydir" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>PharData::addEmptyDir</refname>
<refpurpose>Add an empty directory to the tar/zip archive</refpurpose>
@ -9,7 +9,7 @@
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>void</type><methodname>PharData::addEmptyDir</methodname>
<methodparam><type>string</type><parameter>dirname</parameter></methodparam>
<methodparam><type>string</type><parameter>directory</parameter></methodparam>
</methodsynopsis>
<para>
@ -23,7 +23,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>dirname</parameter></term>
<term><parameter>directory</parameter></term>
<listitem>
<para>
The name of the empty directory to create in the phar archive
@ -78,7 +78,6 @@ try {
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="phardata.addfile">
<refentry xml:id="phardata.addfile" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>PharData::addFile</refname>
<refpurpose>Add a file from the filesystem to the tar/zip archive</refpurpose>
@ -9,8 +9,8 @@
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>void</type><methodname>PharData::addFile</methodname>
<methodparam><type>string</type><parameter>file</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>localname</parameter></methodparam>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>localName</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>
@ -28,7 +28,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>file</parameter></term>
<term><parameter>filename</parameter></term>
<listitem>
<para>
Full or relative path to a file on disk to be added
@ -37,7 +37,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>localname</parameter></term>
<term><parameter>localName</parameter></term>
<listitem>
<para>
Path that the file will be stored in the archive.
@ -54,6 +54,28 @@
no return value, exception is thrown on failure.
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.0.0</entry>
<entry>
<parameter>localName</parameter> is now nullable.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
@ -104,7 +126,6 @@ try {
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="phardata.addfromstring">
<refentry xml:id="phardata.addfromstring" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>PharData::addFromString</refname>
<refpurpose>Add a file from the filesystem to the tar/zip archive</refpurpose>
@ -9,7 +9,7 @@
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>void</type><methodname>PharData::addFromString</methodname>
<methodparam><type>string</type><parameter>localname</parameter></methodparam>
<methodparam><type>string</type><parameter>localName</parameter></methodparam>
<methodparam><type>string</type><parameter>contents</parameter></methodparam>
</methodsynopsis>
@ -25,7 +25,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>localname</parameter></term>
<term><parameter>localName</parameter></term>
<listitem>
<para>
Path that the file will be stored in the archive.
@ -98,7 +98,6 @@ try {
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -9,9 +9,9 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>array</type><methodname>PharData::buildFromDirectory</methodname>
<methodparam><type>string</type><parameter>base_dir</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>regex</parameter></methodparam>
<modifier>public</modifier> <type class="union"><type>array</type><type>false</type></type><methodname>PharData::buildFromDirectory</methodname>
<methodparam><type>string</type><parameter>directory</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>pattern</parameter><initializer>""</initializer></methodparam>
</methodsynopsis>
<para>
@ -27,7 +27,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>base_dir</parameter></term>
<term><parameter>directory</parameter></term>
<listitem>
<para>
The full or relative path to the directory that contains all files
@ -36,7 +36,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>regex</parameter></term>
<term><parameter>pattern</parameter></term>
<listitem>
<para>
An optional pcre regular expression that is used to filter the
@ -54,7 +54,7 @@
<para>
<function>Phar::buildFromDirectory</function> returns an associative array
mapping internal path of file to the full path of the file on the
filesystem.
filesystem, &return.falseforfailure;.
</para>
</refsect1>
@ -105,7 +105,6 @@ $phar2->buildFromDirectory(dirname(__FILE__) . '/project', '/\.php$/');
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -9,9 +9,9 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>array</type><methodname>PharData::buildFromIterator</methodname>
<methodparam><type>Iterator</type><parameter>iter</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>base_directory</parameter></methodparam>
<modifier>public</modifier> <type class="union"><type>array</type><type>false</type></type><methodname>PharData::buildFromIterator</methodname>
<methodparam><type>Traversable</type><parameter>iterator</parameter></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>baseDirectory</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>
Populate a tar or zip archive from an iterator. Two styles of iterators are supported,
@ -27,7 +27,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>iter</parameter></term>
<term><parameter>iterator</parameter></term>
<listitem>
<para>
Any iterator that either associatively maps tar/zip file to location or
@ -36,7 +36,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>base_directory</parameter></term>
<term><parameter>baseDirectory</parameter></term>
<listitem>
<para>
For iterators that return SplFileInfo objects, the portion of each
@ -53,7 +53,7 @@
<para>
<function>PharData::buildFromIterator</function> returns an associative array
mapping internal path of file to the full path of the file on the
filesystem.
filesystem, &return.falseforfailure;.
</para>
</refsect1>
@ -63,12 +63,34 @@
This method returns <classname>UnexpectedValueException</classname> when the
iterator returns incorrect values, such as an integer key instead of a
string, a <classname>BadMethodCallException</classname> when an
SplFileInfo-based iterator is passed without a <parameter>base_directory</parameter>
SplFileInfo-based iterator is passed without a <parameter>baseDirectory</parameter>
parameter, or a <classname>PharException</classname> if there were errors
saving the phar archive.
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.0.0</entry>
<entry>
<parameter>baseDirectory</parameter> is now nullable.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<example>
@ -142,7 +164,7 @@ $phar->setStub($phar->createDefaultStub('cli/index.php', 'www/index.php'));
<title>A <function>PharData::buildFromIterator</function> with other iterators</title>
<para>
The second form of the iterator can be used with any iterator that returns
a key => value mapping, such as an <classname>ArrayIterator</classname>:
a key =&gt; value mapping, such as an <classname>ArrayIterator</classname>:
</para>
<para>
<programlisting role="php">

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="phardata.compress">
<refentry xml:id="phardata.compress" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>PharData::compress</refname>
<refpurpose>Compresses the entire tar/zip archive using Gzip or Bzip2 compression</refpurpose>
@ -9,9 +9,9 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>PharData</type><methodname>PharData::compress</methodname>
<modifier>public</modifier> <type class="union"><type>Phar</type><type>null</type></type><methodname>PharData::compress</methodname>
<methodparam><type>int</type><parameter>compression</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>extension</parameter></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>extension</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>
@ -65,7 +65,8 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
A <classname>PharData</classname> object is returned.
A <classname>PharData</classname> object is returned on success,
or &null; on failure.
</para>
</refsect1>
@ -79,6 +80,28 @@
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.0.0</entry>
<entry>
<parameter>extension</parameter> is now nullable.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
@ -110,7 +133,6 @@ $p3 = $p2->compress(Phar::NONE); // exception: /path/to/my.tar already exists
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -7,13 +7,13 @@
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<constructorsynopsis>
<modifier>public</modifier> <methodname>PharData::__construct</methodname>
<methodparam><type>string</type><parameter>fname</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>flags</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>alias</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>format</parameter><initializer><constant>Phar::TAR</constant></initializer></methodparam>
</methodsynopsis>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer>FilesystemIterator::SKIP_DOTS | FilesystemIterator::UNIX_PATHS</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>alias</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter>format</parameter><initializer>0</initializer></methodparam>
</constructorsynopsis>
</refsect1>
<refsect1 role="parameters">
@ -21,7 +21,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>fname</parameter></term>
<term><parameter>filename</parameter></term>
<listitem>
<para>
Path to an existing tar/zip archive or to-be-created archive
@ -96,7 +96,6 @@ echo file_get_contents('phar:///path/to/my.tar/example.txt');
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -10,10 +10,10 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>PharData</type><methodname>PharData::convertToData</methodname>
<methodparam choice="opt"><type>int</type><parameter>format</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>compression</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>extension</parameter></methodparam>
<modifier>public</modifier> <type class="union"><type>Phar</type><type>null</type></type><methodname>PharData::convertToData</methodname>
<methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>format</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>compression</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>extension</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>
@ -82,8 +82,8 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
The method returns a <classname>PharData</classname> object on success and throws an
exception on failure.
The method returns a <classname>PharData</classname> object on success,
or &null; on failure.
</para>
</refsect1>
@ -99,6 +99,28 @@
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.0.0</entry>
<entry>
<parameter>format</parameter>, <parameter>compression</parameter>, and <parameter>extension</parameter> are now nullable.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
@ -142,7 +164,6 @@ try {
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -10,10 +10,10 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>Phar</type><methodname>PharData::convertToExecutable</methodname>
<methodparam choice="opt"><type>int</type><parameter>format</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>compression</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>extension</parameter></methodparam>
<modifier>public</modifier> <type class="union"><type>Phar</type><type>null</type></type><methodname>PharData::convertToExecutable</methodname>
<methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>format</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>compression</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>extension</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
&phar.write;
<para>
@ -81,8 +81,8 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
The method returns a <classname>Phar</classname> object on success and throws an
exception on failure.
The method returns a <classname>Phar</classname> object on success,
or &null; on failure.
</para>
</refsect1>
@ -99,6 +99,28 @@
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.0.0</entry>
<entry>
<parameter>format</parameter>, <parameter>compression</parameter>, and <parameter>localName</parameter> are now nullable.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
@ -140,7 +162,6 @@ try {
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -10,8 +10,8 @@
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>bool</type><methodname>PharData::copy</methodname>
<methodparam><type>string</type><parameter>oldfile</parameter></methodparam>
<methodparam><type>string</type><parameter>newfile</parameter></methodparam>
<methodparam><type>string</type><parameter>to</parameter></methodparam>
<methodparam><type>string</type><parameter>from</parameter></methodparam>
</methodsynopsis>
<para>
@ -26,14 +26,14 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>oldfile</parameter></term>
<term><parameter>to</parameter></term>
<listitem>
<para>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>newfile</parameter></term>
<term><parameter>from</parameter></term>
<listitem>
<para>
</para>
@ -96,7 +96,6 @@ echo file_get_contents('phar://myphar.tar/c'); // outputs "hi"
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="phardata.decompress">
<refentry xml:id="phardata.decompress" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>PharData::decompress</refname>
<refpurpose>Decompresses the entire Phar archive</refpurpose>
@ -9,8 +9,8 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>PharData</type><methodname>PharData::decompress</methodname>
<methodparam choice="opt"><type>string</type><parameter>extension</parameter></methodparam>
<modifier>public</modifier> <type class="union"><type>Phar</type><type>null</type></type><methodname>PharData::decompress</methodname>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>extension</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>
@ -30,8 +30,7 @@
parameter.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
@ -49,13 +48,13 @@
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
A <classname>PharData</classname> object is returned.
A <classname>PharData</classname> object is returned on success,
or &null; on failure.
</para>
</refsect1>
@ -69,6 +68,28 @@
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.0.0</entry>
<entry>
<parameter>extension</parameter> is now nullable.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
@ -106,7 +127,6 @@ $p->decompress(); // creates /path/to/my.tar
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -10,7 +10,7 @@
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>bool</type><methodname>PharData::delete</methodname>
<methodparam><type>string</type><parameter>entry</parameter></methodparam>
<methodparam><type>string</type><parameter>localName</parameter></methodparam>
</methodsynopsis>
<para>
@ -25,7 +25,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>entry</parameter></term>
<term><parameter>localName</parameter></term>
<listitem>
<para>
Path within an archive to the file to delete.
@ -86,7 +86,6 @@ try {
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -10,8 +10,8 @@
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>bool</type><methodname>PharData::extractTo</methodname>
<methodparam><type>string</type><parameter>pathto</parameter></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>array</type><type>null</type></type><parameter>files</parameter><initializer>&null;</initializer></methodparam>
<methodparam><type>string</type><parameter>directory</parameter></methodparam>
<methodparam choice="opt"><type class="union"><type>array</type><type>string</type><type>null</type></type><parameter>files</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>overwrite</parameter><initializer>&false;</initializer></methodparam>
</methodsynopsis>
@ -32,7 +32,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>pathto</parameter></term>
<term><parameter>directory</parameter></term>
<listitem>
<para>
Path to extract the given <literal>files</literal> to
@ -111,7 +111,6 @@ try {
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="phardata.offsetset">
<refentry xml:id="phardata.offsetset" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>PharData::offsetSet</refname>
<refpurpose>Set the contents of a file within the tar/zip to those of an external file or string</refpurpose>
@ -9,8 +9,8 @@
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>void</type><methodname>PharData::offsetSet</methodname>
<methodparam><type>string</type><parameter>offset</parameter></methodparam>
<methodparam><type>string</type><parameter>value</parameter></methodparam>
<methodparam><type>string</type><parameter>localName</parameter></methodparam>
<methodparam><type class="union"><type>resource</type><type>string</type></type><parameter>value</parameter></methodparam>
</methodsynopsis>
@ -27,7 +27,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>offset</parameter></term>
<term><parameter>localName</parameter></term>
<listitem>
<para>
The filename (relative path) to modify in a tar or zip archive.
@ -103,7 +103,6 @@ try {
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="phardata.offsetunset">
<refentry xml:id="phardata.offsetunset" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>PharData::offsetUnset</refname>
<refpurpose>Remove a file from a tar/zip archive</refpurpose>
@ -9,7 +9,7 @@
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>bool</type><methodname>PharData::offsetUnset</methodname>
<methodparam><type>string</type><parameter>offset</parameter></methodparam>
<methodparam><type>string</type><parameter>localName</parameter></methodparam>
</methodsynopsis>
@ -28,7 +28,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>offset</parameter></term>
<term><parameter>localName</parameter></term>
<listitem>
<para>
The filename (relative path) to modify in the tar/zip archive.
@ -87,7 +87,6 @@ try {
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="phardata.setdefaultstub">
<refentry xml:id="phardata.setdefaultstub" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>PharData::setDefaultStub</refname>
<refpurpose>Dummy function (Phar::setDefaultStub is not valid for PharData)</refpurpose>
@ -9,8 +9,8 @@
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>bool</type><methodname>PharData::setDefaultStub</methodname>
<methodparam choice="opt"><type>string</type><parameter>index</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>webindex</parameter></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>index</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>webIndex</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>
@ -32,7 +32,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>webindex</parameter></term>
<term><parameter>webIndex</parameter></term>
<listitem>
<para>
Relative path within the phar archive to run if accessed through a web browser
@ -58,6 +58,28 @@
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.0.0</entry>
<entry>
<parameter>webIndex</parameter> is nullable now.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
@ -68,7 +90,6 @@
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -10,7 +10,8 @@
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>void</type><methodname>PharData::setSignatureAlgorithm</methodname>
<methodparam><type>int</type><parameter>sigtype</parameter></methodparam>
<methodparam><type>int</type><parameter>algo</parameter></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>privateKey</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
&phar.write;
@ -27,7 +28,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>sigtype</parameter></term>
<term><parameter>algo</parameter></term>
<listitem>
<para>
One of <literal>Phar::MD5</literal>,
@ -58,6 +59,28 @@
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.0.0</entry>
<entry>
<parameter>privateKey</parameter> is now nullable.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
@ -69,7 +92,6 @@
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -39,8 +39,11 @@
<!-- }}} -->
<classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.pharfileinfo')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[1])">
<xi:fallback/>
</xi:include>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.pharfileinfo')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" />
<classsynopsisinfo role="comment">&InheritedMethods;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.splfileinfo')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[not(@role='procedural')])">
<xi:fallback/>

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="pharfileinfo.chmod">
<refentry xml:id="pharfileinfo.chmod" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>PharFileInfo::chmod</refname>
<refpurpose>Sets file-specific permission bits</refpurpose>
@ -9,7 +9,7 @@
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>void</type><methodname>PharFileInfo::chmod</methodname>
<methodparam><type>int</type><parameter>permissions</parameter></methodparam>
<methodparam><type>int</type><parameter>perms</parameter></methodparam>
</methodsynopsis>
<para>
@ -31,7 +31,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>permissions</parameter></term>
<term><parameter>perms</parameter></term>
<listitem>
<para>
permissions (see <function>chmod</function>)
@ -85,7 +85,6 @@ bool(true)
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,16 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="pharfileinfo.construct">
<refentry xml:id="pharfileinfo.construct" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>PharFileInfo::__construct</refname>
<refpurpose>Construct a Phar entry object</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<constructorsynopsis>
<modifier>public</modifier> <methodname>PharFileInfo::__construct</methodname>
<methodparam><type>string</type><parameter>entry</parameter></methodparam>
</methodsynopsis>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
</constructorsynopsis>
<para>
This should not be called directly. Instead, a PharFileInfo object
@ -24,7 +24,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>entry</parameter></term>
<term><parameter>filename</parameter></term>
<listitem>
<para>
The full url to retrieve a file. If you wish to retrieve the information
@ -92,7 +92,6 @@ line number 3: dude
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="pharfileinfo.getmetadata">
<refentry xml:id="pharfileinfo.getmetadata" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>PharFileInfo::getMetadata</refname>
<refpurpose>Returns file-specific meta-data saved with a file</refpurpose>
@ -9,7 +9,7 @@
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>mixed</type><methodname>PharFileInfo::getMetadata</methodname>
<void/>
<methodparam choice="opt"><type>array</type><parameter>unserializeOptions</parameter><initializer>[]</initializer></methodparam>
</methodsynopsis>
<para>
@ -30,6 +30,28 @@
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.0.0</entry>
<entry>
The parameter <parameter>unserializeOptions</parameter> has been added.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
@ -83,7 +105,6 @@ array(2) {
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="pharfileinfo.iscompressed">
<refentry xml:id="pharfileinfo.iscompressed" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>PharFileInfo::isCompressed</refname>
<refpurpose>Returns whether the entry is compressed</refpurpose>
@ -9,7 +9,7 @@
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>bool</type><methodname>PharFileInfo::isCompressed</methodname>
<methodparam choice="opt"><type>int</type><parameter>compression_type</parameter><initializer>9021976</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>compression</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>
@ -23,7 +23,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>compression_type</parameter></term>
<term><parameter>compression</parameter></term>
<listitem>
<para>
One of <constant>Phar::GZ</constant> or <constant>Phar::BZ2</constant>,
@ -42,6 +42,28 @@
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.0.0</entry>
<entry>
<parameter>compression</parameter> is now nullable.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
@ -95,7 +117,6 @@ bool(true)
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml