public function accessBundleExposedRoutesAction($bundleName, $controllerName, $actionName, $parameters)
    {
        $bundle = $this->getBundleById($bundleName);

        $controller = (new BundleControllerResolver($this->getApplication()))->resolve($bundleName, $controllerName);

        if ($controller instanceof AbstractBundleController) {
            $controller->setBundle($bundle);
        }

        if (false === empty($parameters)) {
            $parameters = array_filter(explode('/', $parameters));
        }

        $response = call_user_func_array([$controller, $actionName], (array)$parameters);

        return is_object($response) && $response instanceof Response
            ? $response
            : $this->createJsonResponse($response)
        ;
    }
public function accessBundleExposedRoutesAction($bundleName, $controllerName, $actionName, $parameters)
    {
        $bundle = $this->getBundleById($bundleName);

        $controller = (new BundleControllerResolver($this->getApplication()))->resolve($bundleName, $controllerName);

        if ($controller instanceof AbstractBundleController) {
            $controller->setBundle($bundle);
        }

        if (false === empty($parameters)) {
            $parameters = array_filter(explode('/', $parameters));
        }

        $response = call_user_func_array([$controller, $actionName], (array)$parameters);

        return is_object($response) && $response instanceof Response
            ? $response
            : $this->createJsonResponse($response)
        ;
    }
public function accessBundleExposedRoutesAction ( $ bundleName , $ controllerName , $ actionName , $ parameters ) { $ bundle = $ this -> getBundleById ( $ bundleName ) ; $ controller = ( new BundleControllerResolver ( $ this -> getApplication ( ) ) ) -> resolve ( $ bundleName , $ controllerName ) ; if ( $ controller instanceof AbstractBundleController ) { $ controller -> setBundle ( $ bundle ) ; } if ( false === empty ( $ parameters ) ) { $ parameters = array_filter ( explode ( '/' , $ parameters ) ) ; } $ response = call_user_func_array ( [ $ controller , $ actionName ] , ( array ) $ parameters ) ; return is_object ( $ response ) && $ response instanceof Response ? $ response : $ this -> createJsonResponse ( $ response ) ; }
This method is the front controller of every bundles exposed actions.

@param string $bundleName     name of bundle we want to reach its exposed actions
@param string $controllerName controller name
@param string $actionName     name of exposed action we want to reach
@param string $parameters     optionnal, action's parameters

@return Response              Bundle Controller Response

@Rest\Security("is_fully_authenticated() & has_role('ROLE_API_USER')")
This method is the front controller of every bundles exposed actions .