| 1 | <?php |
||
| 15 | class SpyingFileFetcher implements FileFetcher { |
||
| 16 | |||
| 17 | private $fileFetcher; |
||
| 18 | |||
| 19 | private $fetchedUrls = []; |
||
| 20 | |||
| 21 | 6 | public function __construct( FileFetcher $fileFetcher ) { |
|
| 24 | |||
| 25 | /** |
||
| 26 | * @see FileFetcher::fetchFile |
||
| 27 | * @throws FileFetchingException |
||
| 28 | */ |
||
| 29 | 4 | public function fetchFile( string $fileUrl ): string { |
|
| 33 | |||
| 34 | /** |
||
| 35 | * Returns an ordered list of fetched URLs. Duplicates are preserved. |
||
| 36 | * |
||
| 37 | * @return string[] |
||
| 38 | */ |
||
| 39 | 3 | public function getFetchedUrls(): array { |
|
| 42 | |||
| 43 | /** |
||
| 44 | * @since 4.3 |
||
| 45 | * |
||
| 46 | * @return string|null |
||
| 47 | */ |
||
| 48 | 2 | public function getFirstFetchedUrl() { |
|
| 51 | |||
| 52 | } |
||
| 53 |