| 1 | <?php |
||
| 6 | class PhpObjectContent implements Content |
||
| 7 | { |
||
| 8 | /** |
||
| 9 | * @var mixed object |
||
| 10 | */ |
||
| 11 | private $object; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * @param mixed $object |
||
| 15 | */ |
||
| 16 | public function __construct($object) |
||
| 21 | |||
| 22 | |||
| 23 | /** |
||
| 24 | * @return string |
||
| 25 | */ |
||
| 26 | public function asString(): string |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @return ContentType |
||
| 33 | */ |
||
| 34 | public function getContentType(): ContentType |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @param $value |
||
| 41 | * @throws EnsureException |
||
| 42 | */ |
||
| 43 | private function ensureIsObject($value) |
||
| 49 | } |
||
| 50 |