1 | <?php |
||
15 | class CallbackFileFetcher implements FileFetcher { |
||
16 | |||
17 | private $callback; |
||
18 | |||
19 | /** |
||
20 | * The callback should have the same signature and contract as @see FileFetcher::fetchFile() |
||
21 | * Note that this contract include not throwing exceptions other than FileFetchingException. |
||
22 | * |
||
23 | * @param callable $callback |
||
24 | */ |
||
25 | 2 | public function __construct( callable $callback ) { |
|
28 | |||
29 | 2 | public function fetchFile( string $fileUrl ): string { |
|
32 | |||
33 | } |
||
34 |