nlopess Mon Aug 1 18:29:42 2005 EDT
Modified files:
/phpdoc/en/reference/spl/functions class-implements.xml
class-parents.xml
Log:
fix #33853 and a user note: missing description & changelog for the autoload
parameter
http://cvs.php.net/diff.php/phpdoc/en/reference/spl/functions/class-implements.xml?r1=1.6&r2=1.7&ty=u
Index: phpdoc/en/reference/spl/functions/class-implements.xml
diff -u phpdoc/en/reference/spl/functions/class-implements.xml:1.6
phpdoc/en/reference/spl/functions/class-implements.xml:1.7
--- phpdoc/en/reference/spl/functions/class-implements.xml:1.6 Wed May 4
05:39:10 2005
+++ phpdoc/en/reference/spl/functions/class-implements.xml Mon Aug 1
18:29:40 2005
@@ -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 @@
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>
http://cvs.php.net/diff.php/phpdoc/en/reference/spl/functions/class-parents.xml?r1=1.4&r2=1.5&ty=u
Index: phpdoc/en/reference/spl/functions/class-parents.xml
diff -u phpdoc/en/reference/spl/functions/class-parents.xml:1.4
phpdoc/en/reference/spl/functions/class-parents.xml:1.5
--- phpdoc/en/reference/spl/functions/class-parents.xml:1.4 Wed May 4
05:39:10 2005
+++ phpdoc/en/reference/spl/functions/class-parents.xml Mon Aug 1 18:29:40 2005
@@ -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 @@
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>