blob: 5cc97ca9981f1ac05ed32983ea2ff7ae3bd5e651 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
<?php
namespace League\Glide\Urls;
use League\Glide\Signatures\SignatureFactory;
class UrlBuilderFactory
{
/**
* Create UrlBuilder instance.
* @param string $baseUrl URL prefixed to generated URL.
* @param string|null $signKey Secret key used to secure URLs.
* @return UrlBuilder The UrlBuilder instance.
*/
public static function create($baseUrl, $signKey = null)
{
$httpSignature = null;
if (!is_null($signKey)) {
$httpSignature = SignatureFactory::create($signKey);
}
return new UrlBuilder($baseUrl, $httpSignature);
}
}
|