note 80619 added to language.oop5.overloading
| From: | jjdhoTmaturanaahtgmaildhotcom at osu1 dot php dot net | Date: | Fri, 25 Jan 2008 12:16:05 +0000 |
| Subject: | note 80619 added to language.oop5.overloading | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-135399@lists.php.net to get a copy of this message | ||
There isn't some way to overload a method when it's called as a reflection method:
<?php
class TestClass {
function __call($method, $args) {
echo "Method {$method} called with args: " . print_r($args, TRUE);
}
}
$class = new ReflectionClass("TestClass");
$method = $class->getMethod("myMehtod");
//Fatal error: Uncaught exception 'ReflectionException' with message 'Method
myMethod' does not exist'
?>
Juan.
----
Server IP: 80.64.47.13
Probable Submitter: 80.24.9.104
----
Manual Page -- http://www.php.net/manual/en/language.oop5.overloading.php
Edit -- https://master.php.net/note/edit/80619
Del: integrated -- https://master.php.net/note/delete/80619/integrated
Del: useless -- https://master.php.net/note/delete/80619/useless
Del: bad code -- https://master.php.net/note/delete/80619/bad+code
Del: spam -- https://master.php.net/note/delete/80619/spam
Del: non-english -- https://master.php.net/note/delete/80619/non-english
Del: in docs -- https://master.php.net/note/delete/80619/in+docs
Del: other reasons-- https://master.php.net/note/delete/80619
Reject -- https://master.php.net/note/reject/80619
Search -- https://master.php.net/manage/user-notes.php