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

From: Date: Sat, 05 Jun 2004 03:20:24 +0000
Subject: cvs: peardoc /en/package/php/php-compat/php-compat loadfunction.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-4236@lists.php.net to get a copy of this message
aidan Fri Jun 4 23:20:24 2004 EDT Modified files: /peardoc/en/package/php/php-compat/php-compat loadfunction.xml Log: Formatted Used better XML/Docbook http://cvs.php.net/diff.php/peardoc/en/package/php/php-compat/php-compat/loadfunction.xml?r1=1.5&r2=1.6&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.5 peardoc/en/package/php/php-compat/php-compat/loadfunction.xml:1.6 --- peardoc/en/package/php/php-compat/php-compat/loadfunction.xml:1.5 Fri Jun 4 05:51:57 2004 +++ peardoc/en/package/php/php-compat/php-compat/loadfunction.xml Fri Jun 4 23:20:24 2004 @@ -1,72 +1,94 @@ <?xml version="1.0" encoding="ISO-8859-1" ?> -<!-- $Revision: 1.5 $ --> - <refentry id="package.php.php-compat.php-compat.loadfunction"> - <refnamediv> - <refname>PHP_Compat::loadFunction()</refname> - <refpurpose>Load a function, or an array of functions</refpurpose> - </refnamediv> - <refsynopsisdiv> - <funcsynopsis> - <funcsynopsisinfo> - require_once 'PHP/Compat.php'; - </funcsynopsisinfo> - <funcprototype> - <funcdef>mixed <function>PHP_Compat::loadFunction()</function></funcdef> - <paramdef> - mixed <parameter>$function</parameter> - </paramdef> - </funcprototype> - </funcsynopsis> - </refsynopsisdiv> - <refsect1 id="package.php.php-compat.loadfunction.desc"> - &title.desc; - <para> - Loads a function or functions. This method should be called statically. - </para> - </refsect1> - <refsect1 id="package.php.php-compat.loadfunction.parameter"> - &title.param; - <para> - <parameter>mixed $function</parameter> - The name, or an array of names, of functions to load - </para> - </refsect1> - <refsect1 id="package.php.php-compat.loadfunction.return"> - &title.returns; - <para> - <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>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>You may also load a function without using the class.</para> - <example> - <title>Loading a function manually:</title> - <programlisting role="php"> - <![CDATA[ -<?php -require_once 'PHP/Compat/Function/file_put_contents.php'; -?> -]]> - </programlisting> - </example> - </refsect1> - </refentry> +<!-- $Revision: 1.6 $ --> +<refentry id="package.php.php-compat.php-compat.loadfunction"> + <refnamediv> + <refname><function>PHP_Compat::loadFunction()</function></refname> + <refpurpose>Load a function, or an array of functions</refpurpose> + </refnamediv> + + <refsynopsisdiv> + <funcsynopsis> + <funcsynopsisinfo> + require_once 'PHP/Compat.php'; + </funcsynopsisinfo> + + <funcprototype> + <funcdef>mixed <function>PHP_Compat::loadFunction()</function></funcdef> + <paramdef>mixed <parameter>$function</parameter></paramdef> + </funcprototype> + </funcsynopsis> + </refsynopsisdiv> + + <refsect1 id="package.php.php-compat.loadfunction.desc"> + &title.desc; + <para>Loads a function or functions.</para> + </refsect1> + + <refsect1 id="package.php.php-compat.loadfunction.parameter"> + &title.param; + <para> + <variablelist> + <varlistentry> + <term>&type.mixed; <parameter>$function</parameter></term> + <listitem><para>The name, or an array of names, of functions to load</para></listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 id="package.php.php-compat.loadfunction.return"> + &title.returns; + <para> + <variablelist> + <varlistentry> + <term>&type.mixed;</term> + <listitem><para>&true; if the function was loaded properly.</para></listitem> + <listitem><para>&false; if the function was unable to be included (invalid function name) or if the function has already been defined.</para><listitem> + <listitem><para>If you specified an array of functions to load, an array of true/false values is returned.</para></listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 id="package.php.php-compat.loadfunction.example"> + &title.example; + <example> + <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>You may also load a function without using the class.</para> + <example> + <title>Loading a function manually:</title> + <programlisting role="php"> + <![CDATA[ + <?php + require_once 'PHP/Compat/Function/file_put_contents.php'; + ?> + ]]> + </programlisting> + </example> + </refsect1> + + <refsect1 id="package.php.php-compat.loadfunction.note"> + &title.note; + &note.static; + </refsect1> +</refentry> + + <!-- Keep this comment at the end of the file Local variables: mode: sgml @@ -85,4 +107,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

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