PHP Класс Neos\Flow\Mvc\Routing\Router

Наследование: implements Neos\Flow\Mvc\Routing\RouterInterface
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$configurationManager Neos\Flow\Configuration\ConfigurationManager
$lastMatchedRoute Route
$lastResolvedRoute Route
$routerCachingService RouterCachingService
$routes array Array of routes to match against
$routesConfiguration array Array containing the configuration for all routes
$routesCreated boolean TRUE if route object have been created, otherwise FALSE
$systemLogger Neos\Flow\Log\SystemLoggerInterface

Открытые методы

Метод Описание
addRoute ( Route $route ) : void Manually adds a route to the beginning of the configured routes
getLastMatchedRoute ( ) : Route Returns the route that has been matched with the last route() call.
getLastResolvedRoute ( ) : Route Returns the route that has been resolved with the last resolve() call.
getRoutes ( ) : array Returns a list of configured routes
resolve ( array $routeValues ) : string Builds the corresponding uri (excluding protocol and host) by iterating through all configured routes and calling their respective resolves() method. If no matching route is found, an empty string is returned.
route ( Request $httpRequest ) : array Iterates through all configured routes and calls matches() on them.
setRoutesConfiguration ( array $routesConfiguration = null ) : void Sets the routes configuration.

Защищенные методы

Метод Описание
createRoutesFromConfiguration ( ) : void Creates \Neos\Flow\Mvc\Routing\Route objects from the injected routes configuration.
initializeRoutesConfiguration ( ) : void Checks if a routes configuration was set and otherwise loads the configuration from the configuration manager.

Описание методов

addRoute() публичный метод

Manually adds a route to the beginning of the configured routes
public addRoute ( Route $route ) : void
$route Route
Результат void

createRoutesFromConfiguration() защищенный метод

Creates \Neos\Flow\Mvc\Routing\Route objects from the injected routes configuration.
protected createRoutesFromConfiguration ( ) : void
Результат void

getLastMatchedRoute() публичный метод

Returns NULL if no route matched or route() has not been called yet
public getLastMatchedRoute ( ) : Route
Результат Route

getLastResolvedRoute() публичный метод

Returns NULL if no route was found or resolve() has not been called yet
public getLastResolvedRoute ( ) : Route
Результат Route

getRoutes() публичный метод

Returns a list of configured routes
public getRoutes ( ) : array
Результат array

initializeRoutesConfiguration() защищенный метод

Checks if a routes configuration was set and otherwise loads the configuration from the configuration manager.
protected initializeRoutesConfiguration ( ) : void
Результат void

resolve() публичный метод

Note: calls of this message are cached by RouterCachingAspect
public resolve ( array $routeValues ) : string
$routeValues array Key/value pairs to be resolved. E.g. array('@package' => 'MyPackage', '@controller' => 'MyController');
Результат string

route() публичный метод

Returns the matchResults of the matching route or NULL if no matching route could be found.
public route ( Request $httpRequest ) : array
$httpRequest Neos\Flow\Http\Request The web request to be analyzed. Will be modified by the router.
Результат array The results of the matching route or NULL if no route matched

setRoutesConfiguration() публичный метод

Sets the routes configuration.
public setRoutesConfiguration ( array $routesConfiguration = null ) : void
$routesConfiguration array The routes configuration or NULL if it should be fetched from configuration
Результат void

Описание свойств

$configurationManager защищенное свойство

protected ConfigurationManager,Neos\Flow\Configuration $configurationManager
Результат Neos\Flow\Configuration\ConfigurationManager

$lastMatchedRoute защищенное свойство

protected Route,Neos\Flow\Mvc\Routing $lastMatchedRoute
Результат Route

$lastResolvedRoute защищенное свойство

protected Route,Neos\Flow\Mvc\Routing $lastResolvedRoute
Результат Route

$routerCachingService защищенное свойство

protected RouterCachingService,Neos\Flow\Mvc\Routing $routerCachingService
Результат RouterCachingService

$routes защищенное свойство

Array of routes to match against
protected array $routes
Результат array

$routesConfiguration защищенное свойство

Array containing the configuration for all routes
protected array $routesConfiguration
Результат array

$routesCreated защищенное свойство

TRUE if route object have been created, otherwise FALSE
protected bool $routesCreated
Результат boolean

$systemLogger защищенное свойство

protected SystemLoggerInterface,Neos\Flow\Log $systemLogger
Результат Neos\Flow\Log\SystemLoggerInterface