EHS Blog
Home  
 

 
Categories


Web Hosting
Website Design
PHP
Perl
JSP
   

 
Archives

No Records !!!
   
 

 
static __call
at 2007-08-12 15:10:22

As everybody knows, one of very nice OO features PHP 5 has is - if method that is not defined is called on an object of a class, the class could define catch-all method named __call and thus route this method call in any way the developer wants, transparent to the user. This allows very flexible way of defining interfaces between classes - even between entities that their interface might be not known to the developer of the class, such as SOAP services. Very useful indeed.

However, we can not do this on a class itself - we couldn’t define static __call and have it route class (static) method calls the same way regular __call routes the object method calls. I wonder maybe we should have it. Along with all other __methods for overloading stuff, of course. We couldn’t probably name it __call since we already have one call but something like __scall could work.



Blog Source - http://php100.wordpress.com/feed/
 


Last 10 Posts
   
  - Shuffling methods

  - dirname(__FILE__)

  - static __call

  - Making $$$ with PHP

  - Improving executor

  - Graceful recovery

  - Kill resources

  - We are doomed!

  - Namespaces - can we keep it simple?

  - Linux World

   


Check Out Amazon