RouteTags
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. |
Methods
Creates an instance without any tags
Creates an instance with one given tag
Creates an instance with one given tags
Creates a new instance with the given $tag added If the $tag has been added already, this instance is returned
Whether a given $tag is contained in the collection of this instance
Returns the tags of this tag collection as value array
Details
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
RouteTags
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