Reference documentation and code samples for the Google API Core Client class PathTemplate.
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.
Namespace
Google \ ApiCore
Methods
__construct
PathTemplate constructor.
Parameter
Name
Description
path
string
A path template string
__toString
Returns
Type
Description
string
A string representation of the path template
render
Renders a path template using the provided bindings.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,[]]