public function UriTemplate::expand in Lockr 7.3
File
- vendor/
guzzlehttp/ guzzle/ src/ UriTemplate.php, line 38
Class
- UriTemplate
- Expands URI templates. Userland implementation of PECL uri_template.
Namespace
GuzzleHttpCode
public function expand($template, array $variables) {
if (false === strpos($template, '{')) {
return $template;
}
$this->template = $template;
$this->variables = $variables;
return preg_replace_callback('/\\{([^\\}]+)\\}/', [
$this,
'expandMatch',
], $this->template);
}