I neet access to current object in a static method.
Code:
protected static $name;
public static function name($modulename)
{
self::$name = $modulename;
}
public function __call($name, $arguments)
{
$me = new test(self::$name);
return $me->$name($arguments);
}
I want to be able to call method log in Log class. Like this
echo Mods::name("Log")->log("test")
;
How do i do that?