RouteSorter

class \TYPO3\CMS\Core\Routing\RouteSorter

Pre-processing of given routes based on their actual disposal concerning given parameters.

Table of Contents

Constants

EARLIER  : mixed = -1
LATER  : mixed = 1

Properties

$originalParameters  : array<string, string>
$routes  : Route[]

Methods

getRoutes()  : Route[]
sortRoutesForGeneration()  : self
withOriginalParameters()  : self
withRoutes()  : self
compareAllVariablesPresence()  : int|null
compareDefaultRoutes()  : int|null
compareDefaultsAmount()  : int|null
compareForGeneration()  : int
compareMandatoryVariablesPresence()  : int|null
compareMissingDefaultsAmount()  : int|null
compareStaticRoutes()  : int|null
getActualRouteDefaults()  : array<string, string>
Filters route variable defaults that are actually used in route path.
getAllRouteVariables()  : array<string, int>
getMandatoryRouteVariables()  : array<string, int>
getRouteParameters()  : array<string, string>

Constants

Properties

$originalParameters

protected array<string, string> $originalParameters = []

Methods

sortRoutesForGeneration()

public sortRoutesForGeneration() : self

Return values

self

withOriginalParameters()

public withOriginalParameters(array $originalParameters) : self

Parameters

$originalParameters : array

Return values

self

withRoutes()

public withRoutes(array $routes) : self

Parameters

$routes : array

Return values

self

compareAllVariablesPresence()

protected compareAllVariablesPresence(Route $self, Route $other[, int $action = self::EARLIER ]) : int|null

Parameters

$self : Route
$other : Route
$action : int = self::EARLIER

Return values

int|null

compareDefaultRoutes()

protected compareDefaultRoutes(Route $self, Route $other[, int $action = self::LATER ]) : int|null

Parameters

$self : Route
$other : Route
$action : int = self::LATER

Return values

int|null

compareDefaultsAmount()

protected compareDefaultsAmount(Route $self, Route $other[, int $action = self::LATER ]) : int|null

Parameters

$self : Route
$other : Route
$action : int = self::LATER

Return values

int|null

compareForGeneration()

protected compareForGeneration(Route $self, Route $other) : int

Parameters

$self : Route
$other : Route

Return values

int

compareMandatoryVariablesPresence()

protected compareMandatoryVariablesPresence(Route $self, Route $other[, int $action = self::EARLIER ]) : int|null

Parameters

$self : Route
$other : Route
$action : int = self::EARLIER

Return values

int|null

compareMissingDefaultsAmount()

protected compareMissingDefaultsAmount(Route $self, Route $other[, int $action = self::LATER ]) : int|null

Parameters

$self : Route
$other : Route
$action : int = self::LATER

Return values

int|null

compareStaticRoutes()

protected compareStaticRoutes(Route $self, Route $other[, int $action = self::LATER ]) : int|null

Parameters

$self : Route
$other : Route
$action : int = self::LATER

Return values

int|null

getActualRouteDefaults()

Filters route variable defaults that are actually used in route path.

protected getActualRouteDefaults(Route $route) : array<string, string>

Parameters

$route : Route

Return values

array<string, string>

getAllRouteVariables()

protected getAllRouteVariables(Route $route) : array<string, int>

Parameters

$route : Route

Return values

array<string, int>

getMandatoryRouteVariables()

protected getMandatoryRouteVariables(Route $route) : array<string, int>

Parameters

$route : Route

Return values

array<string, int>

getRouteParameters()

protected getRouteParameters(Route $route) : array<string, string>

Parameters

$route : Route

Return values

array<string, string>
On this page