cvs: peardoc /en/package/php/php-compat/php-compat loadversion.xml
| From: | Aidan Lister | Date: | Tue, 23 Nov 2004 15:42:04 +0000 |
| Subject: | cvs: peardoc /en/package/php/php-compat/php-compat loadversion.xml | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-5211@lists.php.net to get a copy of this message | ||
aidan Tue Nov 23 10:42:04 2004 EDT
Added files:
/peardoc/en/package/php/php-compat/php-compat loadversion.xml
Log:
Initial commit
http://cvs.php.net/co.php/peardoc/en/package/php/php-compat/php-compat/loadversion.xml?r=1.1&p=1
Index: peardoc/en/package/php/php-compat/php-compat/loadversion.xml
+++ peardoc/en/package/php/php-compat/php-compat/loadversion.xml
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!-- $Revision: 1.1 $ -->
<refentry id="package.php.php-compat.php-compat.loadfunction">
<refnamediv>
<refname><function>PHP_Compat::loadVersion</function></refname>
<refpurpose>Load all components, or all components until a given version of
PHP</refpurpose>
</refnamediv>
<refsynopsisdiv>
<funcsynopsis>
<funcsynopsisinfo>
require_once 'PHP/Compat.php';
</funcsynopsisinfo>
<funcprototype>
<funcdef>array <function>PHP_Compat::loadVersion</function></funcdef>
<paramdef>string <parameter>$version</parameter></paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
<refsect1 id="package.php.php-compat.loadfunction.desc">
&title.desc;
<para>Load all components, or all components until a given version of PHP.</para>
</refsect1>
<refsect1 id="package.php.php-compat.loadfunction.parameter">
&title.param;
<para>
<variablelist>
<varlistentry>
<term>&type.string; <parameter>$version</parameter></term>
<listitem><para>The version of PHP to load components
until.</para></listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 id="package.php.php-compat.loadfunction.return">
&title.returns;
<para>&type.array;</para>
<para>
<simplelist>
<member>
An associative array of boolean values. The key is the name of the
component loaded.
The value for whether or not the component was loaded correctly.
</member>
</simplelist>
</para>
</refsect1>
<refsect1 id="package.php.php-compat.loadfunction.example">
&title.example;
<example>
<title>Loading all components:</title>
<programlisting role="php">
<![CDATA[
<?php
require_once 'PHP/Compat.php';
$components = PHP_Compat::loadVersion();
// To see which components were loaded
print_r($components);
?>
]]>
</programlisting>
<para>
This example would show a long list of components which
were loaded.
</para>
</example>
<example>
<title>Loading up to a specific version:</title>
<para>
The components loaded would be those with versions lower
than, or equal to the supplied version and greater
than the current PHP version.
</para>
<programlisting role="php">
<![CDATA[
<?php
require_once 'PHP/Compat.php';
$components = PHP_Compat::loadVersion('4.3.0');
// To see which components were loaded
print_r($components);
?>
]]>
</programlisting>
<para>
This would output an array of components which were loaded.
The output would be simular to:
</para>
<screen>
<![CDATA[
Array
(
[array_diff_assoc] => 1
[file_get_contents] => 1
[get_include_path] => 1
[html_entity_decode] => 1
[image_type_to_mime_type] => 1
[ob_get_clean] => 1
[ob_get_flush] => 1
[restore_include_path] => 1
[set_include_path] => 1
[str_shuffle] => 1
[str_word_count] => 1
[FILE] => 1
[STD] => 1
[UPLOAD_ERR] => 1
)
]]>
</screen>
</example>
</refsect1>
<refsect1 id="package.php.php-compat.loadfunction.note">
&title.note;
¬e.shouldstatic;
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->