View Single Post
Old 07-01-2009, 06:50 PM   #3 (permalink)
Jim
The Addict
 
Jim's Avatar
 
Join Date: Nov 2007
Location: the Netherlands
Posts: 281
Thanks: 2
Jim is on a distinguished road
Default

I want to use it like this:

PHP Code:
class Foo 
{
  function 
__call($name$args)
  {
    if(
file_exists(MODULE_PATH '/' $name '.php';
    {
      require_once 
MODULE_PATH '/' $name '.php';
      
      
$mObj = new {$name}($args); // Dont know if this will work, but its about the idea
      
return $mObj->result(); 
    }
  }

This is some fast code, not how I would like to build it (e.g. I dont want to check if the module exists every time etc)
__________________
Nunchaku! Who doesn't like martial arts? =)
Send a message via MSN to Jim Send a message via Skype™ to Jim
Jim is offline  
Reply With Quote