| Total Complexity | 7 |
| Total Lines | 44 |
| Duplicated Lines | 0 % |
| Changes | 4 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 14 | class AssetService |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * The default HydeFront version to load. |
||
| 18 | * |
||
| 19 | * @property string $version HydeFront SemVer Tag |
||
| 20 | */ |
||
| 21 | public string $version = 'v2.0'; |
||
| 22 | |||
| 23 | public function version(): string |
||
| 26 | } |
||
| 27 | |||
| 28 | public function constructCdnPath(string $file): string |
||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Alias for constructCdnPath. |
||
| 35 | */ |
||
| 36 | public function cdnLink(string $file): string |
||
| 39 | } |
||
| 40 | |||
| 41 | public function mediaLink(string $file): string |
||
| 42 | { |
||
| 43 | return Hyde::relativeLink("media/$file").$this->getCacheBustKey($file); |
||
| 44 | } |
||
| 45 | |||
| 46 | public function hasMediaFile(string $file): bool |
||
| 47 | { |
||
| 48 | return file_exists(Hyde::path('_media').'/'.$file); |
||
| 49 | } |
||
| 50 | |||
| 51 | protected function getCacheBustKey(string $file): string |
||
| 58 | } |
||
| 59 | } |
||
| 60 |