protected function addMethod($alias, $method) { if (!is_callable(array($this, $method))) { throw new MethodNotFoundException($alias); } $this->methods[$alias] = $method; return $this; }