Re: cvs: phpdoc /en/reference/spl/functions class-implements.xmlclass-parents.xml

From: Date: Thu, 04 Aug 2005 11:43:19 +0000
Subject: Re: cvs: phpdoc /en/reference/spl/functions class-implements.xmlclass-parents.xml
References: 1 2 3  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969369490@lists.php.net to get a copy of this message
Yes, I was crazy... First I didn't see __autoload and I've seen it when I tested the script... but Ive forgotten to modify my mail before I send it hehe... Jean-Sébastien Goupil jsgoupil@gmail.com Nuno Lopes wrote:
You are right. I've updated the output of the examples and I've changed the class name. (its stupid, but __autoload accepted it). And the __autoload() function is there, just before the last class_xx() call. Thanks, Nuno ----- Original Message -----
You should update the output ? but there is no __autoload function shown here... do you repeat the output 3 or 4 times ? moreover, dash (-) is not allowed in class name... Jean-Sébastien Goupil jsgoupil@gmail.com Nuno Lopes wrote:
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> 


« previous php.doc (#969369490) next »