Route extends Route

TYPO3's route is built on top of Symfony's route with some special handling of "Aspects" built on top of a route

Internal

as this is tightly coupled to Symfony's Routing and we try to encapsulate this, please note that this might change if we change the under-the-hood implementation.

Table of Contents

Properties

$aspects  : array<string|int, AspectInterface>
$compiled  : CompiledRoute|null

Methods

__construct()  : mixed
addAspects()  : $this
Adds aspects to the existing maps.
filterAspects()  : array<string|int, AspectInterface>
getArguments()  : array<string|int, mixed>
getAspect()  : AspectInterface|null
Returns the aspect for the given key.
getAspects()  : array<string|int, mixed>
Returns all aspects.
getEnhancer()  : EnhancerInterface|null
hasAspect()  : bool
Checks if an aspect is set for the given key.
setAspect()  : $this
Sets an aspect for the given key.
setAspects()  : $this
Sets the aspects and removes existing ones.

Properties

$compiled

protected CompiledRoute|null $compiled

Methods

__construct()

public __construct(string $path[, array<string|int, mixed> $defaults = [] ][, array<string|int, mixed> $requirements = [] ][, array<string|int, mixed> $options = [] ][, string|null $host = '' ][, mixed $schemes = [] ][, mixed $methods = [] ][, string|null $condition = '' ][, array<string|int, mixed> $aspects = [] ]) : mixed
Parameters
$path : string
$defaults : array<string|int, mixed> = []
$requirements : array<string|int, mixed> = []
$options : array<string|int, mixed> = []
$host : string|null = ''
$schemes : mixed = []
$methods : mixed = []
$condition : string|null = ''
$aspects : array<string|int, mixed> = []

addAspects()

Adds aspects to the existing maps.

public addAspects(array<string|int, mixed> $aspects) : $this

This method implements a fluent interface.

Parameters
$aspects : array<string|int, mixed>

The aspects

Return values
$this

filterAspects()

public filterAspects(array<string|int, string> $classNames[, array<string|int, string> $variableNames = [] ]) : array<string|int, AspectInterface>
Parameters
$classNames : array<string|int, string>

All (logical AND) class names that must match (including interfaces, abstract classes and traits)

$variableNames : array<string|int, string> = []

Variable names to be filtered

Return values
array<string|int, AspectInterface>

getArguments()

public getArguments() : array<string|int, mixed>
Tags
todo

'_arguments' are added implicitly, make it explicit in enhancers

Return values
array<string|int, mixed>

getAspect()

Returns the aspect for the given key.

public getAspect(string $key) : AspectInterface|null
Parameters
$key : string

The key

Return values
AspectInterface|null

The regex or null when not given

getAspects()

Returns all aspects.

public getAspects() : array<string|int, mixed>
Return values
array<string|int, mixed>

The aspects

hasAspect()

Checks if an aspect is set for the given key.

public hasAspect(string $key) : bool
Parameters
$key : string

A variable name

Return values
bool

true if an aspect is specified, false otherwise

setAspects()

Sets the aspects and removes existing ones.

public setAspects(array<string|int, mixed> $aspects) : $this

This method implements a fluent interface.

Parameters
$aspects : array<string|int, mixed>

The aspects

Return values
$this

        
On this page

Search results