07-01-2009, 07:50 PM
|
#3 (permalink)
|
|
The Addict
Join Date: Nov 2007
Location: the Netherlands
Posts: 281
Thanks: 2
|
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? =)
|
|
|