PHP Class Neos\Flow\Command\RoutingCommandController

Inheritance: extends Neos\Flow\Cli\CommandController
Mostra file Open project: neos/flow-development-collection

Protected Properties

Property Type Description
$configurationManager Neos\Flow\Configuration\ConfigurationManager
$objectManager Neos\Flow\ObjectManagement\ObjectManagerInterface
$router Neos\Flow\Mvc\Routing\Router

Public Methods

Method Description
getPathCommand ( string $package, string $controller = 'Standard', string $action = 'index', string $format = 'html' ) : void Generate a route path
listCommand ( ) : void List the known routes
routePathCommand ( string $path, string $method = 'GET' ) : void Route the given route path
showCommand ( integer $index ) : void Show information for a route

Protected Methods

Method Description
getControllerObjectName ( string $packageKey, string $subPackageKey, string $controllerName ) : string Returns the object name of the controller defined by the package, subpackage key and controller name

Method Details

getControllerObjectName() protected method

Returns the object name of the controller defined by the package, subpackage key and controller name
protected getControllerObjectName ( string $packageKey, string $subPackageKey, string $controllerName ) : string
$packageKey string the package key of the controller
$subPackageKey string the subpackage key of the controller
$controllerName string the controller name excluding the "Controller" suffix
return string The controller's Object Name or NULL if the controller does not exist

getPathCommand() public method

This command takes package, controller and action and displays the generated route path and the selected route: ./flow routing:getPath --format json Acme.Demo\\Sub\\Package
public getPathCommand ( string $package, string $controller = 'Standard', string $action = 'index', string $format = 'html' ) : void
$package string Package key and subpackage, subpackage parts are separated with backslashes
$controller string Controller name, default is 'Standard'
$action string Action name, default is 'index'
$format string Requested Format name default is 'html'
return void

listCommand() public method

This command displays a list of all currently registered routes.
public listCommand ( ) : void
return void

routePathCommand() public method

This command takes a given path and displays the detected route and the selected package, controller and action.
public routePathCommand ( string $path, string $method = 'GET' ) : void
$path string The route path to resolve
$method string The request method (GET, POST, PUT, DELETE, ...) to simulate
return void

showCommand() public method

This command displays the configuration of a route specified by index number.
public showCommand ( integer $index ) : void
$index integer The index of the route as given by routing:list
return void

Property Details

$configurationManager protected_oe property

protected ConfigurationManager,Neos\Flow\Configuration $configurationManager
return Neos\Flow\Configuration\ConfigurationManager

$objectManager protected_oe property

protected ObjectManagerInterface,Neos\Flow\ObjectManagement $objectManager
return Neos\Flow\ObjectManagement\ObjectManagerInterface

$router protected_oe property

protected Router,Neos\Flow\Mvc\Routing $router
return Neos\Flow\Mvc\Routing\Router