From 57e995fbd9d94e620acc7ae598073cfd23c21544 Mon Sep 17 00:00:00 2001 From: Gabor Hojtsy Date: Mon, 20 Aug 2001 13:37:41 +0000 Subject: [PATCH] Please use 4 (four!) spaces for identation, many, many WS ONLY FIXES. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@55533 c90b9560-bf6c-de11-be94-00142212c4b1 --- language/oop.xml | 98 ++++++++++++++++++++++++------------------------ 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/language/oop.xml b/language/oop.xml index 5e794bd27e..a0abd49608 100644 --- a/language/oop.xml +++ b/language/oop.xml @@ -1,5 +1,5 @@ - + Classes and Objects @@ -310,18 +310,18 @@ $different_cart = new Constructor_Cart("20", 17); class A { - function A() - { - echo "I am the constructor of A.<br>\n"; - } + function A() + { + echo "I am the constructor of A.<br>\n"; + } } class B extends A { - function C() - { - echo "I am a regular function.<br>\n"; - } + function C() + { + echo "I am a regular function.<br>\n"; + } } // no constructor is being called in PHP 3. @@ -347,24 +347,24 @@ $b = new B; class A { - function A() - { - echo "I am the constructor of A.<br>\n"; - } - - function B() - { - echo "I am a regular function named B in class A.<br>\n"; - echo "I am not a constructor in A.<br>\n"; - } + function A() + { + echo "I am the constructor of A.<br>\n"; + } + + function B() + { + echo "I am a regular function named B in class A.<br>\n"; + echo "I am not a constructor in A.<br>\n"; + } } class B extends A { - function C() - { - echo "I am a regular function.<br>\n"; - } + function C() + { + echo "I am a regular function.<br>\n"; + } } // This will call B() as a constructor. @@ -433,19 +433,19 @@ $b = new B; class A { - function example() - { - echo "I am the original function A::example().<br>\n"; - } + function example() + { + echo "I am the original function A::example().<br>\n"; + } } class B extends A { - function example() - { - echo "I am the redefined function B::example().<br>\n"; - A::example(); - } + function example() + { + echo "I am the redefined function B::example().<br>\n"; + A::example(); + } } // there is no object of class A. @@ -524,19 +524,19 @@ $b->example(); class A { - function example() - { - echo "I am A::example() and provide basic functionality.<br>\n"; - } + function example() + { + echo "I am A::example() and provide basic functionality.<br>\n"; + } } class B extends A { - function example() - { - echo "I am B::example and provide additional functionality().<br>\n"; - parent::example(); - } + function example() + { + echo "I am B::example and provide additional functionality().<br>\n"; + parent::example(); + } } $b = new B; @@ -594,12 +594,12 @@ $b->example(); classa.inc: class A { - var $one = 1; + var $one = 1; - function show_one() - { - echo $this->one; - } + function show_one() + { + echo $this->one; + } } page1.php: @@ -750,9 +750,9 @@ set in constructor set in constructor set in constructor */ - - - + + + Apparently there is no difference, but in fact there is a very significant one: $bar1 and