cvs: peardoc /en/package/php/php-compat/php-compat loadconstant.xml

From: Date: Sat, 05 Jun 2004 08:44:39 +0000
Subject: cvs: peardoc /en/package/php/php-compat/php-compat loadconstant.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-4247@lists.php.net to get a copy of this message
aidan Sat Jun 5 04:44:39 2004 EDT Modified files: /peardoc/en/package/php/php-compat/php-compat loadconstant.xml Log: Cleaned up, reworded http://cvs.php.net/diff.php/peardoc/en/package/php/php-compat/php-compat/loadconstant.xml?r1=1.7&r2=1.8&ty=u Index: peardoc/en/package/php/php-compat/php-compat/loadconstant.xml diff -u peardoc/en/package/php/php-compat/php-compat/loadconstant.xml:1.7 peardoc/en/package/php/php-compat/php-compat/loadconstant.xml:1.8 --- peardoc/en/package/php/php-compat/php-compat/loadconstant.xml:1.7 Fri Jun 4 05:51:57 2004 +++ peardoc/en/package/php/php-compat/php-compat/loadconstant.xml Sat Jun 5 04:44:39 2004 @@ -1,47 +1,67 @@ <?xml version="1.0" encoding="ISO-8859-1" ?> -<!-- $Revision: 1.7 $ --> - <refentry id="package.php.php-compat.php-compat.loadconstant"> - <refnamediv> - <refname>PHP_Compat::loadConstant()</refname> - <refpurpose>Loads a constant, or an array of constants</refpurpose> - </refnamediv> - <refsynopsisdiv> - <funcsynopsis> - <funcsynopsisinfo> - require_once 'PHP/Compat.php'; - </funcsynopsisinfo> - <funcprototype> - <funcdef>mixed <function>PHP_Compat::loadConstant()</function></funcdef> - <paramdef> - mixed <parameter>$constant</parameter> - </paramdef> - </funcprototype> - </funcsynopsis> - </refsynopsisdiv> - <refsect1 id="package.php.php-compat.loadconstant.desc"> - &title.desc; - <para> - Loads a constant or constants. This method should be called statically. - </para> - </refsect1> - <refsect1 id="package.php.php-compat.loadconstant.parameter"> - &title.param; - <para> - <parameter>mixed $constant</parameter> - The name, or an array of names, of constants to load - </para> - </refsect1> - <refsect1 id="package.php.php-compat.loadconstant.return"> - &title.returns; - <para> - <parameter>mixed</parameter> - TRUE if the constant was loaded properly; FALSE if the constant was unable to be included (invalid constant name) or if the constant has already been defined. If you specified an array of constants to load, PHP_Compat will return an array of true/false values. - </para> - </refsect1> - <refsect1 id="package.php.php-compat.loadconstant.example"> - &title.example; - <example> - <title>Loading a constant with the class:</title> - <programlisting role="php"> - <![CDATA[ +<!-- $Revision: 1.8 $ --> +<refentry id="package.php.php-compat.php-compat.loadfunction"> + <refnamediv> + <refname><function>PHP_Compat::loadConstant()</function></refname> + <refpurpose>Load a constant, or an array of constants</refpurpose> + </refnamediv> + + <refsynopsisdiv> + <funcsynopsis> + <funcsynopsisinfo> + require_once 'PHP/Compat.php'; + </funcsynopsisinfo> + + <funcprototype> + <funcdef>mixed <function>PHP_Compat::loadConstant</function></funcdef> + <paramdef>mixed <parameter>$constant</parameter></paramdef> + </funcprototype> + </funcsynopsis> + </refsynopsisdiv> + + <refsect1 id="package.php.php-compat.loadconstant.desc"> + &title.desc; + <para>Loads a constant, or an array of constants.</para> + </refsect1> + + <refsect1 id="package.php.php-compat.loadconstant.parameter"> + &title.param; + <para> + <variablelist> + <varlistentry> + <term>&type.mixed; <parameter>$constant</parameter></term> + <listitem><para>The name, or an array of names, of constants to load</para></listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 id="package.php.php-compat.loadconstant.return"> + &title.returns; + <para> + <variablelist> + <varlistentry> + <term>&type.mixed;</term> + <listitem> + <para> + <simplelist> + <member>&true; if the constant was loaded properly.</member> + <member>&false; if the constant was not loaded. This could be because it was unable to be included (invalid constant name) or if the constant has already been defined.</member> + <member>If you specified an array of constants to load, an array of &true;/&false; values is returned.</member> + </simplelist> + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 id="package.php.php-compat.loadconstant.example"> + &title.example; + <example> + <title>Loading a constant with the class:</title> + <programlisting role="php"> +<![CDATA[ <?php require_once 'PHP/Compat.php'; @@ -55,21 +75,29 @@ PHP_Compat::loadConstant('STD'); ?> ]]> - </programlisting> - </example> - <para>You may also load a constant without using the class.</para> - <example> - <title>Loading a constant manually:</title> - <programlisting role="php"> - <![CDATA[ + </programlisting> + </example> + + <para>You may also load a constant without using the class.</para> + <example> + <title>Loading a constant manually:</title> + <programlisting role="php"> +<![CDATA[ <?php require_once 'PHP/Compat/Constant/E_STRICT.php'; ?> ]]> - </programlisting> - </example> - </refsect1> - </refentry> + </programlisting> + </example> + </refsect1> + + <refsect1 id="package.php.php-compat.loadconstant.note"> + &title.note; + &note.canstatic; + </refsect1> +</refentry> + + <!-- Keep this comment at the end of the file Local variables: mode: sgml

« previous php.pear.doc (#4247) next »