Document the optional 'details' parameter added in 5.3

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@259263 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Hannes Magnusson 2008-05-07 20:05:01 +00:00
parent 2ac7541357
commit c6e270d1af

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.11 $ -->
<!-- $Revision: 1.12 $ -->
<refentry xml:id="function.ini-get-all" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>ini_get_all</refname>
@ -11,6 +11,7 @@
<methodsynopsis>
<type>array</type><methodname>ini_get_all</methodname>
<methodparam choice="opt"><type>string</type><parameter>extension</parameter></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>details</parameter></methodparam>
</methodsynopsis>
<para>
Returns all the registered configuration options.
@ -30,6 +31,15 @@
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>details</parameter></term>
<listitem>
<para>
Retrieve details settings or only the current value for each setting.
Default is &true; (retrieve details).
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
@ -37,12 +47,21 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns an associative array uses the directive name as the array key,
with elements of that array being <literal>global_value</literal> (set in
Returns an associative array with directive name as the array key.
</para>
<para>
When <parameter>details</parameter> is &true; (default) the array will
contain <literal>global_value</literal> (set in
&php.ini;), <literal>local_value</literal> (perhaps set with
<function>ini_set</function> or &htaccess;), and
<literal>access</literal> (the access level). See the manual section
on <link linkend="configuration.changes">configuration changes</link>
<literal>access</literal> (the access level).
</para>
<para>
When <parameter>details</parameter> is &false; the value will be the
current value of the option.
</para>
<para>
See the manual section
for information on what access levels mean.
</para>
<note>
@ -53,18 +72,40 @@
</note>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>5.3.0</entry>
<entry>
Added <parameter>details</parameter>.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>ini_get_all</function> example</title>
<title><function>ini_get_all</function> examples</title>
<programlisting role="php">
<![CDATA[
<?php
$inis = ini_get_all();
print_r($inis);
print_r(ini_get_all("pcre"));
print_r(ini_get_all());
?>
]]>
</programlisting>
@ -72,23 +113,68 @@ print_r($inis);
<screen>
<![CDATA[
Array
(
[pcre.backtrack_limit] => Array
(
[global_value] => 100000
[local_value] => 100000
[access] => 7
)
[pcre.recursion_limit] => Array
(
[global_value] => 100000
[local_value] => 100000
[access] => 7
)
)
Array
(
[allow_call_time_pass_reference] => Array
(
[global_value] => 1
[local_value] => 1
[access] => 6
)
(
[global_value] => 0
[local_value] => 0
[access] => 6
)
[allow_url_fopen] => Array
(
[global_value] => 1
[local_value] => 1
[access] => 7
)
(
[global_value] => 1
[local_value] => 1
[access] => 4
)
...
)
]]>
</screen>
</example>
<example>
<title>Disabling <parameter>details</parameter></title>
<programlisting role="php">
<![CDATA[
<?php
print_r(ini_get_all("pcre", false)); // Added in PHP 5.3.0
print_r(ini_get_all(null, false)); // Added in PHP 5.3.0
?>
]]>
</programlisting>
&example.outputs.similar;
<screen>
<![CDATA[
Array
(
[pcre.backtrack_limit] => 100000
[pcre.recursion_limit] => 100000
)
Array
(
[allow_call_time_pass_reference] => 0
[allow_url_fopen] => 1
...
)
]]>
</screen>
</example>
@ -99,6 +185,7 @@ Array
&reftitle.seealso;
<para>
<simplelist>
<member><xref linkend="configuration.changes" /></member>
<member><function>ini_get</function></member>
<member><function>ini_restore</function></member>
<member><function>ini_set</function></member>