public function __call($method, $args) { if (isset($this->methods[$method])) { $func = $this->methods[$method]; // Let's pass an instance of ourself, so we can manipulate other closures array_unshift($args, $this); return call_user_func_array($func, $args); } return parent::__call($method, $args); }