protected function checkMethodExist($method)
    {
        if (!method_exists($this, $method)) {
            if ($this->application->isDebugMode()) {
                return $this->createResponse(
                    sprintf('Called undefined method: %s.', get_class($this).'::'.$method),
                    500
                );
            } else {
                throw new \LogicException(sprintf('Called undefined method: %s.', get_class($this).'::'.$method));
            }
        }

        return true;
    }