From e339dcb92333d51e25ccdd128f3faf5f0c70e237 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Wed, 27 Apr 2005 14:24:30 +0000 Subject: [PATCH] Overloading methods must be public (bug #31806) git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@185287 c90b9560-bf6c-de11-be94-00142212c4b1 --- language/oop5/overloading.xml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/language/oop5/overloading.xml b/language/oop5/overloading.xml index 3d076e26b4..372e0cc2b2 100644 --- a/language/oop5/overloading.xml +++ b/language/oop5/overloading.xml @@ -1,5 +1,5 @@ - + Overloading @@ -8,6 +8,8 @@ __call, __get and __set methods. These methods will only be triggered when your object or inherited object doesn't contain the member or method you're trying to access. + All overloading methods must be defined as + public. @@ -41,7 +43,7 @@ class Setter public $n; private $x = array("a" => 1, "b" => 2, "c" => 3); - function __get($nm) + public function __get($nm) { print "Getting [$nm]\n"; @@ -54,7 +56,7 @@ class Setter } } - function __set($nm, $val) + public function __set($nm, $val) { print "Setting [$nm] to $val\n"; @@ -136,7 +138,7 @@ class Caller { private $x = array(1, 2, 3); - function __call($m, $a) + public function __call($m, $a) { print "Method $m called:\n"; var_dump($a);