mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
fix #33853 and a user note: missing description & changelog for the autoload parameter
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@192086 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
a91f6976d8
commit
6b5fcd3f61
2 changed files with 48 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<!-- $Revision: 1.7 $ -->
|
||||
<refentry id="function.class-implements">
|
||||
<refnamediv>
|
||||
<refname>class_implements</refname>
|
||||
|
@ -32,6 +32,16 @@
|
|||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>autoload</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Whether to allow this function to load the class automatically through
|
||||
the <link linkend="language.oop5.autoload">__autoload</link> magic
|
||||
method. Defaults to &true;.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -59,7 +69,8 @@
|
|||
<row>
|
||||
<entry>5.1.0</entry>
|
||||
<entry>
|
||||
Added the option to pass the parameter as a string
|
||||
Added the option to pass the <parameter>class</parameter> parameter as
|
||||
a string. Added the <parameter>autoload</parameter> parameter.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
|
@ -82,6 +93,17 @@ class bar implements foo {}
|
|||
|
||||
print_r(class_implements(new bar));
|
||||
|
||||
// since PHP 5.1 you may also specify the parameter as a string
|
||||
print_r(class_implements('bar'));
|
||||
|
||||
|
||||
function __autoload($class_name) {
|
||||
require_once $class_name . '.php';
|
||||
}
|
||||
|
||||
// use __autoload to load the 'not-loaded' class
|
||||
print_r(class_implements('not-loaded', true));
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<refentry id="function.class-parents">
|
||||
<refnamediv>
|
||||
<refname>class_parents</refname>
|
||||
|
@ -28,7 +28,17 @@
|
|||
<term><parameter>class</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
An object or a string of the class
|
||||
An object (class instance) or a string (class name).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>autoload</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Whether to allow this function to load the class automatically through
|
||||
the <link linkend="language.oop5.autoload">__autoload</link> magic
|
||||
method. Defaults to &true;.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -58,7 +68,8 @@
|
|||
<row>
|
||||
<entry>5.1.0</entry>
|
||||
<entry>
|
||||
Added the option to pass the parameter as a string
|
||||
Added the option to pass the <parameter>class</parameter> parameter as
|
||||
a string. Added the <parameter>autoload</parameter> parameter.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
|
@ -81,6 +92,16 @@ class bar extends foo {}
|
|||
|
||||
print_r(class_parents(new bar));
|
||||
|
||||
// since PHP 5.1 you may also specify the parameter as a string
|
||||
print_r(class_parents('bar'));
|
||||
|
||||
|
||||
function __autoload($class_name) {
|
||||
require_once $class_name . '.php';
|
||||
}
|
||||
|
||||
// use __autoload to load the 'not-loaded' class
|
||||
print_r(class_parents('not-loaded', true));
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
|
|
Loading…
Reference in a new issue