You are here

public function UriTemplate::expand in Auth0 Single Sign On 8.2

File

vendor/guzzlehttp/guzzle/src/UriTemplate.php, line 38

Class

UriTemplate
Expands URI templates. Userland implementation of PECL uri_template.

Namespace

GuzzleHttp

Code

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);
}