public function __call($name, $args) { if (!isset($this->helpers[$name])) { throw new \InvalidArgumentException(sprintf('Undefined helper "%s"', $name)); } return $args ? call_user_func_array($this->helpers[$name], $args) : $this->helpers[$name]; }