| 1 |
<?php |
| 2 |
/** |
| 3 |
* The meta reader contract. |
| 4 |
* |
| 5 |
* @package SolidWP\Performance |
| 6 |
*/ |
| 7 |
|
| 8 |
declare( strict_types=1 ); |
| 9 |
|
| 10 |
namespace SolidWP\Performance\Page_Cache\Meta\Contracts; |
| 11 |
|
| 12 |
use SolidWP\Performance\Page_Cache\Meta\Exceptions\MetadataNotReadableException; |
| 13 |
use SolidWP\Performance\Page_Cache\Meta\Meta; |
| 14 |
|
| 15 |
/** |
| 16 |
* @internal |
| 17 |
*/ |
| 18 |
interface Meta_Reader { |
| 19 |
|
| 20 |
/** |
| 21 |
* Read the data from a meta file and return a Meta value object. |
| 22 |
* |
| 23 |
* @param string $url The URL associated with the metadata. |
| 24 |
* |
| 25 |
* @throws MetadataNotReadableException If we're unable to read the metadata. |
| 26 |
* |
| 27 |
* @return Meta |
| 28 |
*/ |
| 29 |
public function read( string $url ): Meta; |
| 30 |
} |
| 31 |
|