public function getMethod($name)
    {
        if ($this->hasMethod($name)) {
            return $this->methods[$name];
        }
        throw new ModelException(
            'Method ' . $name . ' does not exist.'
        );
    }