src/Sulu/Bundle/PageBundle/Command/ValidateWebspacesCommand.php
private function validateControllerAction($controllerAction)
    {
        $result = $this->controllerNameConverter->parse($controllerAction);

        list($class, $method) = explode('::', $result);

        if (!method_exists($class, $method)) {
            $reflector = new \ReflectionClass($class);

            throw new \Exception(sprintf(
                'Controller Action "%s" not exist in "%s" (looked into: %s).',
                $method,
                $class,
                $reflector->getFileName()
            ));
        }
    }
private function validateControllerAction($controllerAction)
    {
        $result = $this->controllerNameConverter->parse($controllerAction);

        list($class, $method) = explode('::', $result);

        if (!method_exists($class, $method)) {
            $reflector = new \ReflectionClass($class);

            throw new \Exception(sprintf(
                'Controller Action "%s" not exist in "%s" (looked into: %s).',
                $method,
                $class,
                $reflector->getFileName()
            ));
        }
    }
private function validateControllerAction ( $ controllerAction ) { $ result = $ this -> controllerNameConverter -> parse ( $ controllerAction ) ; list ( $ class , $ method ) = explode ( '::' , $ result ) ; if ( ! method_exists ( $ class , $ method ) ) { $ reflector = new \ ReflectionClass ( $ class ) ; throw new \ Exception ( sprintf ( 'Controller Action "%s" not exist in "%s" (looked into: %s).' , $ method , $ class , $ reflector -> getFileName ( ) ) ) ; } }
Validate controller action.

@param string $controllerAction

@throws \Exception
Validate controller action .