src/Graviton/RestBundle/Service/RestUtils.php
public function getControllerFromRoute(Route $route)
    {
        $ret = false;
        $actionParts = explode(':', $route->getDefault('_controller'));

        if (count($actionParts) == 2) {
            $ret = $this->container->get($actionParts[0]);
        }

        return $ret;
    }
public function getControllerFromRoute(Route $route)
    {
        $ret = false;
        $actionParts = explode(':', $route->getDefault('_controller'));

        if (count($actionParts) == 2) {
            $ret = $this->container->get($actionParts[0]);
        }

        return $ret;
    }
public function getControllerFromRoute ( Route $ route ) { $ ret = false ; $ actionParts = explode ( ':' , $ route -> getDefault ( '_controller' ) ) ; if ( count ( $ actionParts ) == 2 ) { $ ret = $ this -> container -> get ( $ actionParts [ 0 ] ) ; } return $ ret ; }
Gets the controller from a Route

@param Route $route Route

@return bool|object The controller or false
Gets the controller from a Route