__call() magic method
| From: | Diogo Neves | Date: | Sat, 30 Aug 2008 20:02:41 +0000 |
| Subject: | __call() magic method | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-40171@lists.php.net to get a copy of this message | ||
Hi all,
I'm emailling to ask why __call isn't called when you call a private
method from outside of function...
In my opinion, this error should exist, but when you haven't an __call
function, because outside the scope of class it only should see public
methods, then if it don't exist it should call the __call
Fatal error: Call to private method user::print_user() from context
'' in /home/diogo/Documents/devspace/mangas.dev/index.php on line 47
Of course my opinion only counts what it counts, not too much I believe :)
Anyway, it's the correct beaviour or its bugie?
Make my opinion some sense?
Is there anyway of implement or own magic method that gets called
before any method in a given class?
--
Thanks by your attention,
Diogo Neves
Web Developer @ SAPO.pt by PrimeIT.pt