Represents a relative resource template, meaning that it will never contain a leading slash or trailing verb (":").
Examples: projects projects/{project} foo/{bar=**}/fizz/*
Templates use the syntax of the API platform; see https://github.com/googleapis/api-common-protos/blob/master/google/api/http.proto 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 AbsoluteResourceTemplate, which can then be used to perform matching and instantiation.
- internal
CloneableInstantiable
| Methods |
| public __construct(string $path) RelativeResourceTemplate constructor.
|
| public __toString() : string |
| public match(string $path) |
| public matches(string $path) |
| public render(array $bindings) |
| Properties |
private array $segments
|
| Methods |
private static buildKeySegmentTuples(array $segments, ?string $separator = NULL)
|
private static countDoubleWildcards(array $segments)
|
private static flattenKeySegmentTuples(array $keySegmentTuples)
|
| private matchException(string $path, string $reason) |
| private renderingException(array $bindings, string $reason) |
| private static renderSegments(array $segmentsToRender) Joins segments using their separators.
|
| Methods |
private static buildKeySegmentTuples(array $segments, ?string $separator = NULL)
|
private static countDoubleWildcards(array $segments)
|
private static flattenKeySegmentTuples(array $keySegmentTuples)
|
| private static renderSegments(array $segmentsToRender) Joins segments using their separators.
|