mirror of
https://0xacab.org/radar/radar-wp.git
synced 2025-04-22 07:46:31 +02:00
Initial import.
This commit is contained in:
commit
86383280c9
428 changed files with 68738 additions and 0 deletions
26
vendor/guzzle/parser/Guzzle/Parser/UriTemplate/PeclUriTemplate.php
vendored
Normal file
26
vendor/guzzle/parser/Guzzle/Parser/UriTemplate/PeclUriTemplate.php
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
<?php
|
||||
|
||||
namespace Guzzle\Parser\UriTemplate;
|
||||
|
||||
use Guzzle\Common\Exception\RuntimeException;
|
||||
|
||||
/**
|
||||
* Expands URI templates using the uri_template pecl extension (pecl install uri_template-beta)
|
||||
*
|
||||
* @link http://pecl.php.net/package/uri_template
|
||||
* @link https://github.com/ioseb/uri-template
|
||||
*/
|
||||
class PeclUriTemplate implements UriTemplateInterface
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
if (!extension_loaded('uri_template')) {
|
||||
throw new RuntimeException('uri_template PECL extension must be installed to use PeclUriTemplate');
|
||||
}
|
||||
}
|
||||
|
||||
public function expand($template, array $variables)
|
||||
{
|
||||
return uri_template($template, $variables);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue