1 | <?php |
||
16 | class IsolateRegistry implements Registry |
||
17 | { |
||
18 | /** |
||
19 | * @var SnapshotMaker |
||
20 | */ |
||
21 | private $snapshotMaker; |
||
22 | |||
23 | /** |
||
24 | * @var PropertyCloner |
||
25 | */ |
||
26 | private $propertyCloner; |
||
27 | |||
28 | /** |
||
29 | * @var PropertyAccessor |
||
30 | */ |
||
31 | private $propertyAccessor; |
||
32 | |||
33 | /** |
||
34 | * @var array |
||
35 | */ |
||
36 | private $objects; |
||
37 | |||
38 | /** |
||
39 | * @var array |
||
40 | */ |
||
41 | private $snapshots; |
||
42 | |||
43 | /** |
||
44 | * @var array |
||
45 | */ |
||
46 | private $removed; |
||
47 | |||
48 | /** |
||
49 | * @param SnapshotMaker $snapshotMaker |
||
50 | * @param PropertyCloner $propertyCloner |
||
51 | */ |
||
52 | public function __construct(SnapshotMaker $snapshotMaker, PropertyCloner $propertyCloner) |
||
61 | |||
62 | /** |
||
63 | * {@inheritdoc} |
||
64 | */ |
||
65 | public function isRegistered($object) |
||
71 | |||
72 | /** |
||
73 | * {@inheritdoc} |
||
74 | */ |
||
75 | public function register($object) |
||
90 | |||
91 | /** |
||
92 | * {@inheritdoc} |
||
93 | */ |
||
94 | public function getSnapshot($object) |
||
100 | |||
101 | /** |
||
102 | * {@inheritdoc} |
||
103 | */ |
||
104 | public function makeNewSnapshots() |
||
112 | |||
113 | /** |
||
114 | * {@inheritdoc} |
||
115 | */ |
||
116 | public function isRemoved($object) |
||
122 | |||
123 | /** |
||
124 | * {@inheritdoc} |
||
125 | */ |
||
126 | public function remove($object) |
||
136 | |||
137 | /** |
||
138 | * {@inheritdoc} |
||
139 | */ |
||
140 | public function cleanRemoved() |
||
149 | |||
150 | /** |
||
151 | * {@inheritdoc} |
||
152 | */ |
||
153 | public function all() |
||
162 | |||
163 | /** |
||
164 | * {@inheritdoc} |
||
165 | */ |
||
166 | public function reset() |
||
178 | |||
179 | /** |
||
180 | * @param WrappedObject $lazyObject |
||
181 | */ |
||
182 | private function setLazyPropertiesCallback(WrappedObject $lazyObject) |
||
193 | |||
194 | /** |
||
195 | * @param $object |
||
196 | * @return string |
||
197 | */ |
||
198 | private function getId($object) |
||
202 | } |
||
203 |