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;
    }
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;
    }
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 ; }
check if the method exist

@param  String   $method     method name
@return true|Response
@throws \LogicException
check if the method exist