goba            Mon Aug 20 11:54:40 2001 EDT

  Modified files:              
    /phpdoc/en/language oop.xml 
  Log:
  Class names start with an uppercased letters...
  
  
Index: phpdoc/en/language/oop.xml
diff -u phpdoc/en/language/oop.xml:1.24 phpdoc/en/language/oop.xml:1.25
--- phpdoc/en/language/oop.xml:1.24     Mon Aug 20 09:37:41 2001
+++ phpdoc/en/language/oop.xml  Mon Aug 20 11:54:40 2001
@@ -1,5 +1,5 @@
 <?xml encoding="iso-8859-1"?>
-<!-- $Revision: 1.24 $ -->
+<!-- $Revision: 1.25 $ -->
  <chapter id="language.oop">
   <title>Classes and Objects</title>
 
@@ -504,7 +504,7 @@
   <para>
    You may find yourself writing code that refers to
    variables and functions in base classes. This is
-   particularly &true; if your derived class is a refinement
+   particularly true if your derived class is a refinement
    or specialisation of code in your base class. 
   </para>
   
@@ -534,7 +534,7 @@
 {
     function example()
     {
-        echo "I am B::example and provide additional functionality().&lt;br>\n";
+        echo "I am B::example() and provide additional functionality.&lt;br>\n";
         parent::example();
     }
 }
@@ -617,9 +617,9 @@
   include("classa.inc");
 
   $s = implode("", @file("store"));
-  unserialize($s);
+  $a = unserialize($s);
 
-  // now use the function show_one of the $a object.  
+  // now use the function show_one() of the $a object.  
   $a->show_one();
    </programlisting>
   </informalexample>
@@ -695,9 +695,9 @@
     <informalexample>
      <programlisting role="php">
 
-class foo
+class Foo
 {
-    function foo($name)
+    function Foo($name)
     {
         // create a reference inside the global array $globalref
         global $globalref;
@@ -732,7 +732,7 @@
     <informalexample>
      <programlisting role="php">
 
-$bar1 = new foo('set in constructor');
+$bar1 = new Foo('set in constructor');
 $bar1->echoName();
 $globalref[0]->echoName();
 
@@ -806,18 +806,18 @@
    
     <informalexample>
      <programlisting role="php">
-class a
+class A
 {
-    function a($i)
+    function A($i)
     {
         $this->value = $i;
         // try to figure out why we do not need a reference here
-        $this->b = new b($this);
+        $this->b = new B($this);
     }
 
     function createRef()
     {
-        $this->c = new b($this);
+        $this->c = new B($this);
     }
 
     function echoValue()
@@ -827,9 +827,9 @@
 }
 
 
-class b
+class B
 {
-    function b(&amp;$a)
+    function B(&amp;$a)
     {
         $this->a = &amp;$a;
     }
@@ -842,7 +842,7 @@
 
 // try to undestand why using a simple copy here would yield
 // in an undesired result in the *-marked line
-$a =&amp; new a(10);
+$a =&amp; new A(10);
 $a->createRef();
 
 $a->echoValue();
@@ -857,12 +857,12 @@
 
 /*
 output:
-class a: 10
-class b: 10
-class b: 10
-class a: 11
-class b: 11
-class b: 11
+class A: 10
+class B: 10
+class B: 10
+class A: 11
+class B: 11
+class B: 11
 */
      </programlisting>
     </informalexample>


Reply via email to