| 1 | <?php |
||
| 20 | abstract class Reader |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * @var array |
||
| 24 | */ |
||
| 25 | protected $extensions = []; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @param $path |
||
| 29 | * @param null $class |
||
| 30 | * |
||
| 31 | * @return mixed |
||
| 32 | */ |
||
| 33 | abstract public function read($path, $class = null); |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @param $path |
||
| 37 | * |
||
| 38 | * @return bool |
||
| 39 | * |
||
| 40 | * @throws InvalidFileTypeException |
||
| 41 | */ |
||
| 42 | 42 | public function check($path) |
|
| 53 | |||
| 54 | /** |
||
| 55 | * @param $path |
||
| 56 | * |
||
| 57 | * @return string |
||
| 58 | * |
||
| 59 | * @throws InvalidFileTypeException |
||
| 60 | * @throws \DraperStudio\Payload\Exceptions\FileDoesNotExistException |
||
| 61 | */ |
||
| 62 | 36 | public function contents($path) |
|
| 68 | |||
| 69 | /** |
||
| 70 | * @param $path |
||
| 71 | * |
||
| 72 | * @return mixed |
||
| 73 | * |
||
| 74 | * @throws InvalidFileTypeException |
||
| 75 | * @throws \DraperStudio\Payload\Exceptions\FileDoesNotExistException |
||
| 76 | */ |
||
| 77 | 6 | public function get($path) |
|
| 83 | } |
||
| 84 |