1 | <?php |
||
15 | class SerializedEntity implements EntityDocument { |
||
16 | |||
17 | /** |
||
18 | * @var EntityId|null |
||
19 | */ |
||
20 | private $entityId; |
||
21 | |||
22 | /** |
||
23 | * @var array |
||
24 | */ |
||
25 | private $serialization; |
||
26 | |||
27 | /** |
||
28 | * @param EntityId|null $entityId |
||
29 | * @param array $serialization |
||
30 | */ |
||
31 | 8 | public function __construct( EntityId $entityId = null, array $serialization ) { |
|
39 | |||
40 | /** |
||
41 | * @see EntityDocument::getId |
||
42 | */ |
||
43 | 3 | public function getId() { |
|
46 | |||
47 | /** |
||
48 | * @see EntityDocument::setId |
||
49 | */ |
||
50 | public function setId( $id ) { |
||
53 | |||
54 | /** |
||
55 | * @see EntityDocument::getType |
||
56 | */ |
||
57 | 2 | public function getType() { |
|
60 | |||
61 | /** |
||
62 | * @see EntityDocument::isEmpty |
||
63 | */ |
||
64 | 2 | public function isEmpty() { |
|
73 | |||
74 | /** |
||
75 | * @return array |
||
76 | */ |
||
77 | 2 | public function getSerialization() { |
|
80 | } |
||
81 |