cvs: peardoc /en/package/php/php-compat/php-compat loadconstant.xml loadfunction.xml
| From: | Aidan Lister | Date: | Fri, 04 Jun 2004 07:19:58 +0000 |
| Subject: | cvs: peardoc /en/package/php/php-compat/php-compat loadconstant.xml loadfunction.xml | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-4200@lists.php.net to get a copy of this message | ||
aidan Fri Jun 4 03:19:58 2004 EDT
Modified files:
/peardoc/en/package/php/php-compat/php-compat loadconstant.xml
loadfunction.xml
Log:
Updated
http://cvs.php.net/diff.php/peardoc/en/package/php/php-compat/php-compat/loadconstant.xml?r1=1.2&r2=1.3&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.2
peardoc/en/package/php/php-compat/php-compat/loadconstant.xml:1.3
--- peardoc/en/package/php/php-compat/php-compat/loadconstant.xml:1.2 Fri Jun 4 01:36:17 2004
+++ peardoc/en/package/php/php-compat/php-compat/loadconstant.xml Fri Jun 4 03:19:57 2004
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<refentry id="package.php.php-compat.php-compat.loadconstant">
<refnamediv>
<refname>PHP_Compat::loadConstant()</refname>
@@ -11,7 +11,7 @@
require_once 'PHP/Compat.php';
</funcsynopsisinfo>
<funcprototype>
- <funcdef>bool|array
<function>PHP_Compat::loadConstant()</function></funcdef>
+ <funcdef>bool|array
<constant>PHP_Compat::loadConstant()</constant></funcdef>
<paramdef>
string|array <parameter>$constant</parameter>
</paramdef>
@@ -21,44 +21,43 @@
<refsect1 id="package.php.php-compat.loadconstant.desc">
&title.desc;
<para>
- Loads a constant or constants
+ Loads a constant or constants. This method should be called statically.
</para>
</refsect1>
<refsect1 id="package.php.php-compat.loadconstant.parameter">
&title.param;
- <para>
- <itemizedlist>
- <listitem>
- <para>
- <parameter>string|array $constant</parameter> - The name of the constant to
load, or an array of names
- </para>
- </listitem>
- </itemizedlist>
+ <para>
+ <parameter>mixed $constant</parameter> - The name, or an array of names, of constants
to load
+ </para>
</para>
</refsect1>
<refsect1 id="package.php.php-compat.loadconstant.return">
&title.returns;
<para>
- <parameter>bool|array</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.
+ <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>Using <function>PHP_Compat::loadConstant</function></title>
+ <title>Loading a constant with the class:</title>
<programlisting role="php">
<![CDATA[
<?php
require_once 'PHP/Compat.php';
+// load file_put_contents
PHP_Compat::loadConstant('E_STRICT');
+
+// load str_split, array_chunk and file_get_contents
+PHP_Compat::loadConstant(array('E_STRICT', 'PATH_SEPARATOR'));
?>
]]>
</programlisting>
</example>
- <para>Or, without using the PHP_Compat class:</para>
+ <para>You may also load a constant without using the class.</para>
<example>
- <title>Using <function>PHP_Compat::loadConstant</function></title>
+ <title>Loading a constant manually:</title>
<programlisting role="php">
<![CDATA[
<?php
@@ -87,4 +86,4 @@
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
--->
+-->
\ No newline at end of file
http://cvs.php.net/diff.php/peardoc/en/package/php/php-compat/php-compat/loadfunction.xml?r1=1.2&r2=1.3&ty=u
Index: peardoc/en/package/php/php-compat/php-compat/loadfunction.xml
diff -u peardoc/en/package/php/php-compat/php-compat/loadfunction.xml:1.2
peardoc/en/package/php/php-compat/php-compat/loadfunction.xml:1.3
--- peardoc/en/package/php/php-compat/php-compat/loadfunction.xml:1.2 Fri Jun 4 01:36:17 2004
+++ peardoc/en/package/php/php-compat/php-compat/loadfunction.xml Fri Jun 4 03:19:57 2004
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<refentry id="package.php.php-compat.php-compat.loadfunction">
<refnamediv>
<refname>PHP_Compat::loadFunction()</refname>
@@ -21,44 +21,43 @@
<refsect1 id="package.php.php-compat.loadfunction.desc">
&title.desc;
<para>
- Loads a function or functions
+ Loads a function or functions. This method should be called statically.
</para>
</refsect1>
<refsect1 id="package.php.php-compat.loadfunction.parameter">
&title.param;
- <para>
- <itemizedlist>
- <listitem>
- <para>
- <parameter>string|array $function</parameter> - The name of the function to
load, or an array of names
- </para>
- </listitem>
- </itemizedlist>
+ <para>
+ <parameter>mixed $function</parameter> - The name, or an array of names, of functions
to load
+ </para>
</para>
</refsect1>
<refsect1 id="package.php.php-compat.loadfunction.return">
&title.returns;
<para>
- <parameter>bool|array</parameter> - TRUE if the function was loaded properly;
FALSE if the function was unable to be included (invalid function name) or if the function has
already been defined.
+ <parameter>mixed</parameter> - TRUE if the function was loaded properly; FALSE if
the function was unable to be included (invalid function name) or if the function has already been
defined. If you specified an array of functions to load, PHP_Compat will return an array of
true/false values.
</para>
</refsect1>
<refsect1 id="package.php.php-compat.loadfunction.example">
&title.example;
<example>
- <title>Using <function>PHP_Compat::loadFunction</function></title>
+ <title>Loading a function with the class:</title>
<programlisting role="php">
<![CDATA[
<?php
require_once 'PHP/Compat.php';
+// load file_put_contents
PHP_Compat::loadFunction('file_put_contents');
+
+// load str_split, array_chunk and file_get_contents
+PHP_Compat::loadFunction(array('str_split', 'array_chunk',
'file_get_contents'));
?>
]]>
</programlisting>
</example>
- <para>Or, without using the PHP_Compat class:</para>
+ <para>You may also load a function without using the class.</para>
<example>
- <title>Using <function>PHP_Compat::loadFunction</function></title>
+ <title>Loading a function manually:</title>
<programlisting role="php">
<![CDATA[
<?php