final class RouteTags (View source)

RouteTags to be associated with matched/resolved routes

RouteTags can be added by Route Part handlers via the ResolveResult/MatchResult return values The tags will be added to the corresponding cache entries, so that they can be flushed selectively using the RouterCachingService

Constants

PATTERN_TAG

Pattern a tag must match.

\Neos\Cache\Frontend\FrontendInterface::PATTERN_TAG

Methods

static RouteTags
createEmpty()

Creates an instance without any tags

static RouteTags
createFromTag(string $tag)

Creates an instance with one given tag

static RouteTags
createFromArray(array $tags)

Creates an instance with one given tags

merge(RouteTags $tags)

Merges two instances of this class combining and unifying all tags

withTag(string $tag)

Creates a new instance with the given $tag added If the $tag has been added already, this instance is returned

bool
has(string $tag)

Whether a given $tag is contained in the collection of this instance

array
getTags()

Returns the tags of this tag collection as value array

Details

static RouteTags createEmpty()

Creates an instance without any tags

Return Value

RouteTags

static RouteTags createFromTag(string $tag)

Creates an instance with one given tag

Parameters

string $tag

Tag value satisfying the PATTERN_TAG regex

Return Value

RouteTags

static RouteTags createFromArray(array $tags)

Creates an instance with one given tags

Parameters

array $tags

An array of strings satisfying the PATTERN_TAG regex

Return Value

RouteTags

RouteTags merge(RouteTags $tags)

Merges two instances of this class combining and unifying all tags

Parameters

RouteTags $tags

Return Value

RouteTags

RouteTags withTag(string $tag)

Creates a new instance with the given $tag added If the $tag has been added already, this instance is returned

Parameters

string $tag

Return Value

RouteTags

bool has(string $tag)

Whether a given $tag is contained in the collection of this instance

Parameters

string $tag

Return Value

bool

array getTags()

Returns the tags of this tag collection as value array

Return Value

array