Andrey Hristov wrote:
> class foobar {
[...]
> protected function doSomething_objectFubar($fub) {
> $a = func_get_args();var_dump(__METHOD__, $a);
> }
>
> public function doSomething() {
> $args = func_get_args();
> $method_name = __FUNCTION__;
> foreach ($args as $v) {
> $method_name .= "_".gettype($v);
> if (FALSE !==($c_name = get_class($v))) {
> $method_name .= $c_name;
> }
> }
> if (method_exists($this, $method_name)) {
> return call_user_func_array(array($this, $method_name), $args);
> }
> }
> }//class fubar
Now I do a
<?php
class barfoo extends foobar {
}
$barfoo = new barfoo();
$barfoo->doSomething($barfoo);
?>
And it won't work anymore,so I can't extend te class anymore without
changing the class foobar....
johannes
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php