| 1 | <?php |
||
| 18 | class Content implements ContentInterface |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * @var null|string |
||
| 22 | */ |
||
| 23 | private $content = null; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Content constructor. |
||
| 27 | * |
||
| 28 | * @param string $content |
||
| 29 | */ |
||
| 30 | 20 | public function __construct(string $content) |
|
| 34 | |||
| 35 | /** |
||
| 36 | * @return string |
||
| 37 | */ |
||
| 38 | 26 | public function get(): string |
|
| 42 | |||
| 43 | /** |
||
| 44 | * Return the content as an array |
||
| 45 | * |
||
| 46 | * @return array |
||
| 47 | * @throws \NeedleProject\FileIo\Exception\ContentException |
||
| 48 | */ |
||
| 49 | 4 | public function getArray(): array |
|
| 53 | |||
| 54 | /** |
||
| 55 | * @return mixed|\stdClass |
||
| 56 | * @throws \NeedleProject\FileIo\Exception\ContentException |
||
| 57 | */ |
||
| 58 | 4 | public function getObject() |
|
| 62 | } |
||
| 63 |