vrana Wed Apr 27 10:24:30 2005 EDT
Modified files: /phpdoc/en/language/oop5 overloading.xml Log: Overloading methods must be public (bug #31806) http://cvs.php.net/diff.php/phpdoc/en/language/oop5/overloading.xml?r1=1.8&r2=1.9&ty=u Index: phpdoc/en/language/oop5/overloading.xml diff -u phpdoc/en/language/oop5/overloading.xml:1.8 phpdoc/en/language/oop5/overloading.xml:1.9 --- phpdoc/en/language/oop5/overloading.xml:1.8 Wed Apr 27 10:20:08 2005 +++ phpdoc/en/language/oop5/overloading.xml Wed Apr 27 10:24:30 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> +<!-- $Revision: 1.9 $ --> <sect1 id="language.oop5.overloading"> <title>Overloading</title> @@ -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 + <link linkend="language.oop5.visibility">public</link>. </para> <sect2 id="language.oop5.overloading.members"> @@ -41,7 +43,7 @@ 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 @@ } } - function __set($nm, $val) + public function __set($nm, $val) { print "Setting [$nm] to $val\n"; @@ -136,7 +138,7 @@ { private $x = array(1, 2, 3); - function __call($m, $a) + public function __call($m, $a) { print "Method $m called:\n"; var_dump($a);