| 1 | <?php |
||
| 19 | class PsrCacheFileFetcher implements FileFetcher { |
||
| 20 | |||
| 21 | private $fileFetcher; |
||
| 22 | private $cache; |
||
| 23 | |||
| 24 | public function __construct( FileFetcher $fileFetcher, CacheInterface $cache ) { |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @see FileFetcher::fetchFile |
||
| 31 | * @throws FileFetchingException |
||
| 32 | */ |
||
| 33 | public function fetchFile( string $fileUrl ): string { |
||
| 42 | |||
| 43 | private function getFileContentsFromCache( string $fileUrl ): ?string { |
||
| 51 | |||
| 52 | private function retrieveAndCacheFile( $fileUrl ): string { |
||
| 63 | |||
| 64 | } |
||
| 65 |