PathTemplate
class PathTemplate implements ResourceTemplateInterface (View source)
Represents a path template.
Templates use the syntax of the API platform; see the protobuf of HttpRule for details. A template consists of a sequence of literals, wildcards, and variable bindings, where each binding can have a sub-path. A string representation can be parsed into an instance of PathTemplate, which can then be used to perform matching and instantiation.
Methods
PathTemplate constructor.
No description
Renders a path template using the provided bindings.
Check if $path matches a resource string.
Matches a fully qualified path template string.
Details
__construct(string $path = null)
PathTemplate constructor.
string
__toString()
No description
string
render(array $bindings)
Renders a path template using the provided bindings.
bool
matches(string $path)
Check if $path matches a resource string.
array
match(string $path)
Matches a fully qualified path template string.