mfischer                Mon Jun 10 04:43:11 2002 EDT

  Modified files:              
    /phpdoc/en/language oop.xml 
  Log:
  - Document that order of class definition is important (closes #13165).
  # Though the zend engine CAN handle class definitions not in the right order
  # this is not always true, especially when extending classes which extend
  # classes.  See the report.
  
  
Index: phpdoc/en/language/oop.xml
diff -u phpdoc/en/language/oop.xml:1.34 phpdoc/en/language/oop.xml:1.35
--- phpdoc/en/language/oop.xml:1.34     Wed May 15 16:41:17 2002
+++ phpdoc/en/language/oop.xml  Mon Jun 10 04:43:11 2002
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.34 $ -->
+<!-- $Revision: 1.35 $ -->
  <chapter id="language.oop">
   <title>Classes and Objects</title>
 
@@ -255,6 +255,25 @@
     </programlisting>
    </informalexample>
 
+   <para>
+    This is also called a "parent-child" relationship. You create a class,
+    parent, and use <literal>extends</literal> to create a new class
+    <emphasis>based</emphasis> on the parent class: the child class. You can
+    even use this new child class and create another class based on this child
+    class.
+   </para>
+   <note>
+    <para>
+     Classes must be defined before they are used! If you want the class
+     <literal>Named_Cart</literal> to extend the class
+     <literal>Cart</literal>, you will have to define the class
+     <literal>Cart</literal> first. If you want to create another class called
+     <literal>Yellow_named_cart</literal> based on the class
+     <literal>Named_Cart</literal> you have to define
+     <literal>Named_Cart</literal> first. To make it short: the order in which
+     the classes are defined is important.
+    </para>
+   </note>
   </sect1>
 
   <sect1 id="language.oop.constructor">


Reply via email to