Expand the URI template using the supplied variables
string $template URI Template to expand:
array $variables Variables to use with the expansion:
string Returns the expanded template
Overrides UriTemplateInterface::expand
public function expand($template, array $variables) {
$this->template = $template;
$this->variables = $variables;
// Check to ensure that the preg_* function is needed
if (false === strpos($this->template, '{')) {
return $this->template;
}
return preg_replace_callback(self::$regex, array(
$this,
'expandMatch',
), $this->template);
}