cvs: peardoc /en/core/pear/pear-errorstack push.xml
| From: | Christophe Gesch� | Date: | Sun, 17 Jul 2005 21:25:06 +0000 |
| Subject: | cvs: peardoc /en/core/pear/pear-errorstack push.xml | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-6515@lists.php.net to get a copy of this message | ||
moosh Sun Jul 17 17:25:06 2005 EDT
Modified files:
/peardoc/en/core/pear/pear-errorstack push.xml
Log:
- use entities
- indent
http://cvs.php.net/diff.php/peardoc/en/core/pear/pear-errorstack/push.xml?r1=1.4&r2=1.5&ty=u Index: peardoc/en/core/pear/pear-errorstack/push.xml diff -u peardoc/en/core/pear/pear-errorstack/push.xml:1.4 peardoc/en/core/pear/pear-errorstack/push.xml:1.5 --- peardoc/en/core/pear/pear-errorstack/push.xml:1.4 Thu Apr 7 16:38:43 2005 +++ peardoc/en/core/pear/pear-errorstack/push.xml Sun Jul 17 17:25:05 2005 @@ -1,156 +1,204 @@ -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <refentry id="core.pear.pear-errorstack.push"> - <refnamediv> - <refname><function>PEAR_ErrorStack::push</function></refname> - <refpurpose>Add an error to the stack</refpurpose> - </refnamediv> - <refsynopsisdiv> - <funcsynopsis> - <funcsynopsisinfo> - require_once 'PEAR/ErrorStack.php'; - </funcsynopsisinfo> - <funcprototype> - <funcdef>PEAR_Error|array <function>PEAR_ErrorStack::push</function></funcdef> - <paramdef>int <parameter>$code</parameter></paramdef> - <paramdef>string <parameter> <optional>$level = 'error'</optional></parameter></paramdef> - <paramdef>array <parameter> <optional>$params = array()</optional></parameter></paramdef> - <paramdef>string <parameter> <optional>$msg = &false;</optional></parameter></paramdef> - <paramdef>array <parameter> <optional>$repackage = &false;</optional></parameter></paramdef> - <paramdef>array <parameter> <optional>$backtrace = &false;</optional></parameter></paramdef> - </funcprototype> - </funcsynopsis> - </refsynopsisdiv> + <refnamediv> + <refname><function>PEAR_ErrorStack::push</function></refname> + <refpurpose>Add an error to the stack</refpurpose> + </refnamediv> + <refsynopsisdiv> + <funcsynopsis> + <funcsynopsisinfo> + require_once 'PEAR/ErrorStack.php'; + </funcsynopsisinfo> + <funcprototype> + <funcdef>PEAR_Error|array <function>PEAR_ErrorStack::push</function></funcdef> + <paramdef> + &type.int; + <parameter>$code</parameter> + </paramdef> + <paramdef> + &type.string; + <parameter> <optional>$level = 'error'</optional></parameter> + </paramdef> + <paramdef> + &type.array; + <parameter> <optional>$params = array()</optional></parameter> + </paramdef> + <paramdef> + &type.string; + <parameter> <optional>$msg = &false;</optional></parameter> + </paramdef> + <paramdef> + &type.array; + <parameter> <optional>$repackage = &false;</optional></parameter> + </paramdef> + <paramdef> + &type.array; + <parameter> <optional>$backtrace = &false;</optional></parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + </refsynopsisdiv> - <refsect1 id="core.pear.pear-errorstack.push.bcwarning"> - <title>Backwards Compatibility Warning</title> - <warning> - <para> - As of PEAR 1.3.2, PEAR_ErrorStack no longer instantiates and returns an Exception object in PHP5. - Code that relies upon this behavior will break. - </para> - </warning> - </refsect1> - <refsect1 id="core.pear.pear-errorstack.push.desc"> - &title.desc; + <refsect1 id="core.pear.pear-errorstack.push.bcwarning"> + <title>Backwards Compatibility Warning</title> + <warning> + <para> + As of PEAR 1.3.2, + PEAR_ErrorStack no longer instantiates + and returns an Exception object in PHP5. + + Code that relies upon this behavior will break. + </para> + </warning> + </refsect1> + <refsect1 id="core.pear.pear-errorstack.push.desc"> + &title.desc; + <para> + If the message generator exists, + it is called with 2 parameters. + <itemizedlist> + <listitem> + <para>the current Error Stack object</para> + </listitem> + <listitem> <para> - If the message generator exists, it is called with 2 parameters. - <itemizedlist> - <listitem><para>the current Error Stack object</para></listitem> - <listitem><para>an array that is in the same format as an error. Available indices - are 'code', 'package', 'time', 'params', - 'level', and 'context'</para> - </listitem> - </itemizedlist> - Next, if the error should contain context information, this is handled by the context - grabbing method. Finally, the error is pushed onto the proper error stack + an array that is in the same format as an error. + + Available indices are + 'code', 'package', + 'time', 'params', + 'level', and 'context' </para> - </refsect1> - <refsect1 id="core.pear.pear-errorstack.push.param"> - &title.param; - <para> - <variablelist> - <varlistentry> - <term> - &type.int; - <parameter>$code</parameter> - </term> - <listitem> - <para> - Package-specific error code - </para> - </listitem> - </varlistentry> - </variablelist> - <variablelist> - <varlistentry> - <term> - &type.string; - <parameter>$level</parameter> - </term> - <listitem> - <para> - Error level. This is NOT spell-checked - </para> - </listitem> - </varlistentry> - </variablelist> - <variablelist> - <varlistentry> - <term> - &type.array; - <parameter>$params</parameter> - </term> - <listitem> - <para> - associative array of error parameters - </para> - </listitem> - </varlistentry> - </variablelist> - <variablelist> - <varlistentry> - <term> - &type.string; - <parameter>$msg</parameter> - </term> - <listitem> - <para> - Error message, or a portion of it if the message -is to be generated - </para> - </listitem> - </varlistentry> - </variablelist> - <variablelist> - <varlistentry> - <term> - &type.array; - <parameter>$repackage</parameter> - </term> - <listitem> - <para> - If this error re-packages an error pushed by - another package, place the array returned from <link linkend="core.pear.pear-errorstack.pop"><function>pop</function></link> - in this parameter - </para> - </listitem> - </varlistentry> - </variablelist> - <variablelist> - <varlistentry> - <term> - &type.array; - <parameter>$backtrace</parameter> - </term> - <listitem> - <para> - Protected parameter: use this to pass in the - <ulink url="&url.php.lookup;debug_backtrace">&url.php.lookup;debug_backtrace</ulink> - that should be used to find error context. - </para> - </listitem> - </varlistentry> - </variablelist> - </para> - </refsect1> - <refsect1 id="core.pear.pear-errorstack.push.returns"> - &title.returns; - <para> - <emphasis>returns</emphasis> - if compatibility mode is on, a PEAR_Error is also - thrown. If the class Exception exists, then one is returned to allow code like: - <programlisting role="php-highlighted"> + </listitem> + </itemizedlist> + Next, if the error should contain context information, + this is handled by the context + grabbing method. + + Finally, the error is pushed onto the proper error stack + </para> + </refsect1> + <refsect1 id="core.pear.pear-errorstack.push.param"> + &title.param; + <para> + <variablelist> + <varlistentry> + <term> + &type.int; + <parameter>$code</parameter> + </term> + <listitem> + <para> + Package-specific error code + </para> + </listitem> + </varlistentry> + </variablelist> + <variablelist> + <varlistentry> + <term> + &type.string; + <parameter>$level</parameter> + </term> + <listitem> + <para> + Error level. This is NOT spell-checked + </para> + </listitem> + </varlistentry> + </variablelist> + <variablelist> + <varlistentry> + <term> + &type.array; + <parameter>$params</parameter> + </term> + <listitem> + <para> + associative array of error parameters + </para> + </listitem> + </varlistentry> + </variablelist> + <variablelist> + <varlistentry> + <term> + &type.string; + <parameter>$msg</parameter> + </term> + <listitem> + <para> + Error message, + or a portion of it if the message is to be generated + </para> + </listitem> + </varlistentry> + </variablelist> + <variablelist> + <varlistentry> + <term> + &type.array; + <parameter>$repackage</parameter> + </term> + <listitem> + <para> + If this error re-packages an error pushed by + another package, + place the array returned from + <link + linkend="core.pear.pear-errorstack.pop"><function>pop</function></link> + in this parameter + </para> + </listitem> + </varlistentry> + </variablelist> + <variablelist> + <varlistentry> + <term> + &type.array; + <parameter>$backtrace</parameter> + </term> + <listitem> + <para> + Protected parameter: + use this to pass in the + <ulink + url="&url.php.lookup;debug_backtrace">&url.php.lookup;debug_backtrace</ulink> + that should be used to + find error context. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + <refsect1 id="core.pear.pear-errorstack.push.returns"> + &title.returns; + <para> + <emphasis>returns</emphasis> + if compatibility mode is on, + a PEAR_Error is also thrown. + + If the class Exception exists, + then one is returned to allow code like: + <programlisting role="php-highlighted"> <?php 1 throw ($stack-><link linkend="core.pear.pear-errorstack.push">push</link>(MY_ERROR_CODE, 'error', array('username' => 'grob'))); ?> - </programlisting> - </para> - <para> - The errorData property of the exception class will be set to the array that would normally be - returned. If a <link linkend="core.pear.pear-error"><classname>PEAR_Error</classname></link> is returned, the userinfo property is set to the array - </para> - <para>Otherwise, an array is returned in this format: - <programlisting role="php-highlighted"> + </programlisting> + </para> + <para> + The errorData property of the exception class + will be set to the array + that would normally be returned. + + If a + <link + linkend="core.pear.pear-error"><classname>PEAR_Error</classname></link> + is returned, the userinfo property is set to the array + </para> + <para>Otherwise, an array is returned in this format: + <programlisting role="php-highlighted"> <?php 1 array( 2 'code' => $code, @@ -163,19 +211,17 @@ 9 //['repackage' => $err] repackaged error array 10 ); ?> - </programlisting> - </para> - </refsect1> - <refsect1 id="core.pear.pear-errorstack.push.throws"> - &title.throws; - <para> - <emphasis>throws</emphasis> no exceptions thrown - </para> - </refsect1> - <refsect1 id="core.pear.pear-errorstack.push.note"> - &title.note; - ¬e.notstatic; - </refsect1> + </programlisting> + </para> + </refsect1> + <refsect1 id="core.pear.pear-errorstack.push.throws"> + &title.throws; + &noexceptions; + </refsect1> + <refsect1 id="core.pear.pear-errorstack.push.note"> + &title.note; + ¬e.notstatic; + </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables:
http://cvs.php.net/diff.php/peardoc/en/core/pear/pear-errorstack/push.xml?r1=1.4&r2=1.5&ty=u Index: peardoc/en/core/pear/pear-errorstack/push.xml diff -u peardoc/en/core/pear/pear-errorstack/push.xml:1.4 peardoc/en/core/pear/pear-errorstack/push.xml:1.5 --- peardoc/en/core/pear/pear-errorstack/push.xml:1.4 Thu Apr 7 16:38:43 2005 +++ peardoc/en/core/pear/pear-errorstack/push.xml Sun Jul 17 17:25:05 2005 @@ -1,156 +1,204 @@ -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <refentry id="core.pear.pear-errorstack.push"> - <refnamediv> - <refname><function>PEAR_ErrorStack::push</function></refname> - <refpurpose>Add an error to the stack</refpurpose> - </refnamediv> - <refsynopsisdiv> - <funcsynopsis> - <funcsynopsisinfo> - require_once 'PEAR/ErrorStack.php'; - </funcsynopsisinfo> - <funcprototype> - <funcdef>PEAR_Error|array <function>PEAR_ErrorStack::push</function></funcdef> - <paramdef>int <parameter>$code</parameter></paramdef> - <paramdef>string <parameter> <optional>$level = 'error'</optional></parameter></paramdef> - <paramdef>array <parameter> <optional>$params = array()</optional></parameter></paramdef> - <paramdef>string <parameter> <optional>$msg = &false;</optional></parameter></paramdef> - <paramdef>array <parameter> <optional>$repackage = &false;</optional></parameter></paramdef> - <paramdef>array <parameter> <optional>$backtrace = &false;</optional></parameter></paramdef> - </funcprototype> - </funcsynopsis> - </refsynopsisdiv> + <refnamediv> + <refname><function>PEAR_ErrorStack::push</function></refname> + <refpurpose>Add an error to the stack</refpurpose> + </refnamediv> + <refsynopsisdiv> + <funcsynopsis> + <funcsynopsisinfo> + require_once 'PEAR/ErrorStack.php'; + </funcsynopsisinfo> + <funcprototype> + <funcdef>PEAR_Error|array <function>PEAR_ErrorStack::push</function></funcdef> + <paramdef> + &type.int; + <parameter>$code</parameter> + </paramdef> + <paramdef> + &type.string; + <parameter> <optional>$level = 'error'</optional></parameter> + </paramdef> + <paramdef> + &type.array; + <parameter> <optional>$params = array()</optional></parameter> + </paramdef> + <paramdef> + &type.string; + <parameter> <optional>$msg = &false;</optional></parameter> + </paramdef> + <paramdef> + &type.array; + <parameter> <optional>$repackage = &false;</optional></parameter> + </paramdef> + <paramdef> + &type.array; + <parameter> <optional>$backtrace = &false;</optional></parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + </refsynopsisdiv> - <refsect1 id="core.pear.pear-errorstack.push.bcwarning"> - <title>Backwards Compatibility Warning</title> - <warning> - <para> - As of PEAR 1.3.2, PEAR_ErrorStack no longer instantiates and returns an Exception object in PHP5. - Code that relies upon this behavior will break. - </para> - </warning> - </refsect1> - <refsect1 id="core.pear.pear-errorstack.push.desc"> - &title.desc; + <refsect1 id="core.pear.pear-errorstack.push.bcwarning"> + <title>Backwards Compatibility Warning</title> + <warning> + <para> + As of PEAR 1.3.2, + PEAR_ErrorStack no longer instantiates + and returns an Exception object in PHP5. + + Code that relies upon this behavior will break. + </para> + </warning> + </refsect1> + <refsect1 id="core.pear.pear-errorstack.push.desc"> + &title.desc; + <para> + If the message generator exists, + it is called with 2 parameters. + <itemizedlist> + <listitem> + <para>the current Error Stack object</para> + </listitem> + <listitem> <para> - If the message generator exists, it is called with 2 parameters. - <itemizedlist> - <listitem><para>the current Error Stack object</para></listitem> - <listitem><para>an array that is in the same format as an error. Available indices - are 'code', 'package', 'time', 'params', - 'level', and 'context'</para> - </listitem> - </itemizedlist> - Next, if the error should contain context information, this is handled by the context - grabbing method. Finally, the error is pushed onto the proper error stack + an array that is in the same format as an error. + + Available indices are + 'code', 'package', + 'time', 'params', + 'level', and 'context' </para> - </refsect1> - <refsect1 id="core.pear.pear-errorstack.push.param"> - &title.param; - <para> - <variablelist> - <varlistentry> - <term> - &type.int; - <parameter>$code</parameter> - </term> - <listitem> - <para> - Package-specific error code - </para> - </listitem> - </varlistentry> - </variablelist> - <variablelist> - <varlistentry> - <term> - &type.string; - <parameter>$level</parameter> - </term> - <listitem> - <para> - Error level. This is NOT spell-checked - </para> - </listitem> - </varlistentry> - </variablelist> - <variablelist> - <varlistentry> - <term> - &type.array; - <parameter>$params</parameter> - </term> - <listitem> - <para> - associative array of error parameters - </para> - </listitem> - </varlistentry> - </variablelist> - <variablelist> - <varlistentry> - <term> - &type.string; - <parameter>$msg</parameter> - </term> - <listitem> - <para> - Error message, or a portion of it if the message -is to be generated - </para> - </listitem> - </varlistentry> - </variablelist> - <variablelist> - <varlistentry> - <term> - &type.array; - <parameter>$repackage</parameter> - </term> - <listitem> - <para> - If this error re-packages an error pushed by - another package, place the array returned from <link linkend="core.pear.pear-errorstack.pop"><function>pop</function></link> - in this parameter - </para> - </listitem> - </varlistentry> - </variablelist> - <variablelist> - <varlistentry> - <term> - &type.array; - <parameter>$backtrace</parameter> - </term> - <listitem> - <para> - Protected parameter: use this to pass in the - <ulink url="&url.php.lookup;debug_backtrace">&url.php.lookup;debug_backtrace</ulink> - that should be used to find error context. - </para> - </listitem> - </varlistentry> - </variablelist> - </para> - </refsect1> - <refsect1 id="core.pear.pear-errorstack.push.returns"> - &title.returns; - <para> - <emphasis>returns</emphasis> - if compatibility mode is on, a PEAR_Error is also - thrown. If the class Exception exists, then one is returned to allow code like: - <programlisting role="php-highlighted"> + </listitem> + </itemizedlist> + Next, if the error should contain context information, + this is handled by the context + grabbing method. + + Finally, the error is pushed onto the proper error stack + </para> + </refsect1> + <refsect1 id="core.pear.pear-errorstack.push.param"> + &title.param; + <para> + <variablelist> + <varlistentry> + <term> + &type.int; + <parameter>$code</parameter> + </term> + <listitem> + <para> + Package-specific error code + </para> + </listitem> + </varlistentry> + </variablelist> + <variablelist> + <varlistentry> + <term> + &type.string; + <parameter>$level</parameter> + </term> + <listitem> + <para> + Error level. This is NOT spell-checked + </para> + </listitem> + </varlistentry> + </variablelist> + <variablelist> + <varlistentry> + <term> + &type.array; + <parameter>$params</parameter> + </term> + <listitem> + <para> + associative array of error parameters + </para> + </listitem> + </varlistentry> + </variablelist> + <variablelist> + <varlistentry> + <term> + &type.string; + <parameter>$msg</parameter> + </term> + <listitem> + <para> + Error message, + or a portion of it if the message is to be generated + </para> + </listitem> + </varlistentry> + </variablelist> + <variablelist> + <varlistentry> + <term> + &type.array; + <parameter>$repackage</parameter> + </term> + <listitem> + <para> + If this error re-packages an error pushed by + another package, + place the array returned from + <link + linkend="core.pear.pear-errorstack.pop"><function>pop</function></link> + in this parameter + </para> + </listitem> + </varlistentry> + </variablelist> + <variablelist> + <varlistentry> + <term> + &type.array; + <parameter>$backtrace</parameter> + </term> + <listitem> + <para> + Protected parameter: + use this to pass in the + <ulink + url="&url.php.lookup;debug_backtrace">&url.php.lookup;debug_backtrace</ulink> + that should be used to + find error context. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + <refsect1 id="core.pear.pear-errorstack.push.returns"> + &title.returns; + <para> + <emphasis>returns</emphasis> + if compatibility mode is on, + a PEAR_Error is also thrown. + + If the class Exception exists, + then one is returned to allow code like: + <programlisting role="php-highlighted"> <?php 1 throw ($stack-><link linkend="core.pear.pear-errorstack.push">push</link>(MY_ERROR_CODE, 'error', array('username' => 'grob'))); ?> - </programlisting> - </para> - <para> - The errorData property of the exception class will be set to the array that would normally be - returned. If a <link linkend="core.pear.pear-error"><classname>PEAR_Error</classname></link> is returned, the userinfo property is set to the array - </para> - <para>Otherwise, an array is returned in this format: - <programlisting role="php-highlighted"> + </programlisting> + </para> + <para> + The errorData property of the exception class + will be set to the array + that would normally be returned. + + If a + <link + linkend="core.pear.pear-error"><classname>PEAR_Error</classname></link> + is returned, the userinfo property is set to the array + </para> + <para>Otherwise, an array is returned in this format: + <programlisting role="php-highlighted"> <?php 1 array( 2 'code' => $code, @@ -163,19 +211,17 @@ 9 //['repackage' => $err] repackaged error array 10 ); ?> - </programlisting> - </para> - </refsect1> - <refsect1 id="core.pear.pear-errorstack.push.throws"> - &title.throws; - <para> - <emphasis>throws</emphasis> no exceptions thrown - </para> - </refsect1> - <refsect1 id="core.pear.pear-errorstack.push.note"> - &title.note; - ¬e.notstatic; - </refsect1> + </programlisting> + </para> + </refsect1> + <refsect1 id="core.pear.pear-errorstack.push.throws"> + &title.throws; + &noexceptions; + </refsect1> + <refsect1 id="core.pear.pear-errorstack.push.note"> + &title.note; + ¬e.notstatic; + </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: