1 | <?php |
||
9 | class NonSerialisableObject extends LogicException implements ExceptionInterface |
||
10 | { |
||
11 | private const ERROR_TEMPLATE = <<<'ERROR' |
||
12 | The given object %s#%s is not designed to be serialised, yet serialisation was attempted. |
||
13 | |||
14 | This error is raised because the author of %s didn't design it to be serialisable, nor can |
||
15 | guarantee that it will function correctly after serialisation, nor can guarantee that all |
||
16 | its internal components are serialisable. |
||
17 | |||
18 | Please do not serialise %s instances. |
||
19 | ERROR; |
||
20 | |||
21 | /** |
||
22 | * @param object $object |
||
23 | * |
||
24 | * @return NonSerialisableObject |
||
25 | * |
||
26 | * @throws TypeError |
||
27 | */ |
||
28 | 9 | public static function fromAttemptedSerialisation($object) : self |
|
44 | } |
||
45 |