From 864b2ceca4bd18a0fe7b4273171643f9b0fb70ee Mon Sep 17 00:00:00 2001 From: Nuno Lopes Date: Mon, 11 Oct 2004 15:09:41 +0000 Subject: [PATCH] fix the 2nd example git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@170466 c90b9560-bf6c-de11-be94-00142212c4b1 --- language/oop5/visibility.xml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/language/oop5/visibility.xml b/language/oop5/visibility.xml index 8ebf24f0a7..8e856cf452 100644 --- a/language/oop5/visibility.xml +++ b/language/oop5/visibility.xml @@ -1,5 +1,5 @@ - + Visibility @@ -98,23 +98,23 @@ $obj2->printHello(); // Shows Public, Protected2, not Private class MyClass { // Contructors must be public - public __construct() { } + public function __construct() { } // Declare a public method - public MyPublic() { } + public function MyPublic() { } // Declare a protected method - protected MyProtected() { } + protected function MyProtected() { } // Declare a private method - private MyPrivate() { } + private function MyPrivate() { } // This is public - Foo() + function Foo() { - $this->public(); - $this->protected(); - $this->private(); + $this->MyPublic(); + $this->MyProtected(); + $this->MyPrivate(); } } @@ -131,11 +131,11 @@ $myclass->Foo(); // Public, Protected and Private work class MyClass2 extends MyClass { // This is public - Foo2() + function Foo2() { - $this->public(); - $this->protected(); - $this->private(); + $this->MyPublic(); + $this->MyProtected(); + $this->MyPrivate(); // Fatal Error } }