public function __call($name, $args) { if (isset($this->_scopes[$name])) { array_unshift($args, $this); return call_user_func_array($this->_scopes[$name], $args); } throw new \BadMethodCallException("The method '{$name}' does not exist"); }