Function __call

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi all,

I'm sending this email only to ask if someone know if the works of
__call in private methods is bug or feature.

ex.

class user {
public function __call ( $name, $arguments ) {
do something
return call_user_func( array( $this, $name ), $arguments );
}
private function xpto ( $arguments ) {
do something
}
}

new $user = new user();
$user->xpto();

error:
Fatal error:  Call to private method user::xpto() from context '' in
xpto.php on line 11

PS:
what a fucking I was thinking?

well, it don't have this public method, then it sholdn't know it
exists, then go to __call()
i really don't know if it make any sense to someone else, but it still
make sense to me

any thoughts?


---- ----
Thanks by your attention,

Diogo Neves
Developer @ Sapo.pt by PrimeIT.pt

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux