| 1 |
<?php |
| 2 |
/** |
| 3 |
* Implements the Assets service. |
| 4 |
* |
| 5 |
* @package SeQura/WC |
| 6 |
* @subpackage SeQura/WC/Services |
| 7 |
*/ |
| 8 |
namespace SeQura\WC\Services\Assets; |
| 9 |
|
| 10 |
/** |
| 11 |
* Assets |
| 12 |
*/ |
| 13 |
class Assets implements Interface_Assets { |
| 14 |
/** |
| 15 |
* Get the URI of a resource in the CDN. If the environment is not set, it returns an empty string. |
| 16 |
*/ |
| 17 |
public function get_cdn_resource_uri( ?string $env, string $resource ): string { |
| 18 |
return !$env ? '' : "https://{$env}.sequracdn.com/assets/{$resource}"; |
| 19 |
} |
| 20 |
} |
| 21 |
|