|
2 | 2 |
|
3 | 3 | namespace DoctrineProxies\__CG__\ApiSkeletons\Laravel\Doctrine\ApiKey\Entity;
|
4 | 4 |
|
5 |
| - |
6 | 5 | /**
|
7 | 6 | * DO NOT EDIT THIS FILE - IT WAS CREATED BY DOCTRINE'S PROXY GENERATOR
|
8 | 7 | */
|
9 |
| -class AccessEvent extends \ApiSkeletons\Laravel\Doctrine\ApiKey\Entity\AccessEvent implements \Doctrine\ORM\Proxy\Proxy |
| 8 | +class AccessEvent extends \ApiSkeletons\Laravel\Doctrine\ApiKey\Entity\AccessEvent implements \Doctrine\ORM\Proxy\InternalProxy |
10 | 9 | {
|
11 |
| - /** |
12 |
| - * @var \Closure the callback responsible for loading properties in the proxy object. This callback is called with |
13 |
| - * three parameters, being respectively the proxy object to be initialized, the method that triggered the |
14 |
| - * initialization process and an array of ordered parameters that were passed to that method. |
15 |
| - * |
16 |
| - * @see \Doctrine\Common\Proxy\Proxy::__setInitializer |
17 |
| - */ |
18 |
| - public $__initializer__; |
19 |
| - |
20 |
| - /** |
21 |
| - * @var \Closure the callback responsible of loading properties that need to be copied in the cloned object |
22 |
| - * |
23 |
| - * @see \Doctrine\Common\Proxy\Proxy::__setCloner |
24 |
| - */ |
25 |
| - public $__cloner__; |
26 |
| - |
27 |
| - /** |
28 |
| - * @var boolean flag indicating if this object was already initialized |
29 |
| - * |
30 |
| - * @see \Doctrine\Persistence\Proxy::__isInitialized |
31 |
| - */ |
32 |
| - public $__isInitialized__ = false; |
33 |
| - |
34 |
| - /** |
35 |
| - * @var array<string, null> properties to be lazy loaded, indexed by property name |
36 |
| - */ |
37 |
| - public static $lazyPropertiesNames = array ( |
38 |
| -); |
39 |
| - |
40 |
| - /** |
41 |
| - * @var array<string, mixed> default values of properties to be lazy loaded, with keys being the property names |
42 |
| - * |
43 |
| - * @see \Doctrine\Common\Proxy\Proxy::__getLazyProperties |
44 |
| - */ |
45 |
| - public static $lazyPropertiesDefaults = array ( |
46 |
| -); |
47 |
| - |
48 |
| - |
49 |
| - |
50 |
| - public function __construct(?\Closure $initializer = null, ?\Closure $cloner = null) |
51 |
| - { |
52 |
| - |
53 |
| - $this->__initializer__ = $initializer; |
54 |
| - $this->__cloner__ = $cloner; |
55 |
| - } |
56 |
| - |
57 |
| - |
58 |
| - |
59 |
| - |
60 |
| - |
61 |
| - |
62 |
| - |
63 |
| - /** |
64 |
| - * |
65 |
| - * @return array |
66 |
| - */ |
67 |
| - public function __sleep() |
68 |
| - { |
69 |
| - if ($this->__isInitialized__) { |
70 |
| - return ['__isInitialized__', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\AccessEvent' . "\0" . 'ip_address', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\AccessEvent' . "\0" . 'url', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\AccessEvent' . "\0" . 'created_at', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\AccessEvent' . "\0" . 'id', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\AccessEvent' . "\0" . 'apiKey']; |
71 |
| - } |
72 |
| - |
73 |
| - return ['__isInitialized__', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\AccessEvent' . "\0" . 'ip_address', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\AccessEvent' . "\0" . 'url', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\AccessEvent' . "\0" . 'created_at', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\AccessEvent' . "\0" . 'id', '' . "\0" . 'ApiSkeletons\\Laravel\\Doctrine\\ApiKey\\Entity\\AccessEvent' . "\0" . 'apiKey']; |
74 |
| - } |
75 |
| - |
76 |
| - /** |
77 |
| - * |
78 |
| - */ |
79 |
| - public function __wakeup() |
80 |
| - { |
81 |
| - if ( ! $this->__isInitialized__) { |
82 |
| - $this->__initializer__ = function (AccessEvent $proxy) { |
83 |
| - $proxy->__setInitializer(null); |
84 |
| - $proxy->__setCloner(null); |
85 |
| - |
86 |
| - $existingProperties = get_object_vars($proxy); |
87 |
| - |
88 |
| - foreach ($proxy::$lazyPropertiesDefaults as $property => $defaultValue) { |
89 |
| - if ( ! array_key_exists($property, $existingProperties)) { |
90 |
| - $proxy->$property = $defaultValue; |
91 |
| - } |
92 |
| - } |
93 |
| - }; |
94 |
| - |
95 |
| - } |
96 |
| - } |
97 |
| - |
98 |
| - /** |
99 |
| - * |
100 |
| - */ |
101 |
| - public function __clone() |
102 |
| - { |
103 |
| - $this->__cloner__ && $this->__cloner__->__invoke($this, '__clone', []); |
| 10 | + use \Symfony\Component\VarExporter\LazyGhostTrait { |
| 11 | + initializeLazyObject as private; |
| 12 | + setLazyObjectAsInitialized as public __setInitialized; |
| 13 | + isLazyObjectInitialized as private; |
| 14 | + createLazyGhost as private; |
| 15 | + resetLazyObject as private; |
104 | 16 | }
|
105 | 17 |
|
106 |
| - /** |
107 |
| - * Forces initialization of the proxy |
108 |
| - */ |
109 | 18 | public function __load(): void
|
110 | 19 | {
|
111 |
| - $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []); |
| 20 | + $this->initializeLazyObject(); |
112 | 21 | }
|
113 |
| - |
114 |
| - /** |
115 |
| - * {@inheritDoc} |
116 |
| - * @internal generated method: use only when explicitly handling proxy specific loading logic |
117 |
| - */ |
118 |
| - public function __isInitialized(): bool |
119 |
| - { |
120 |
| - return $this->__isInitialized__; |
121 |
| - } |
122 |
| - |
123 |
| - /** |
124 |
| - * {@inheritDoc} |
125 |
| - * @internal generated method: use only when explicitly handling proxy specific loading logic |
126 |
| - */ |
127 |
| - public function __setInitialized($initialized): void |
128 |
| - { |
129 |
| - $this->__isInitialized__ = $initialized; |
130 |
| - } |
131 |
| - |
132 |
| - /** |
133 |
| - * {@inheritDoc} |
134 |
| - * @internal generated method: use only when explicitly handling proxy specific loading logic |
135 |
| - */ |
136 |
| - public function __setInitializer(?\Closure $initializer = null): void |
137 |
| - { |
138 |
| - $this->__initializer__ = $initializer; |
139 |
| - } |
140 |
| - |
141 |
| - /** |
142 |
| - * {@inheritDoc} |
143 |
| - * @internal generated method: use only when explicitly handling proxy specific loading logic |
144 |
| - */ |
145 |
| - public function __getInitializer(): ?\Closure |
146 |
| - { |
147 |
| - return $this->__initializer__; |
148 |
| - } |
149 |
| - |
150 |
| - /** |
151 |
| - * {@inheritDoc} |
152 |
| - * @internal generated method: use only when explicitly handling proxy specific loading logic |
153 |
| - */ |
154 |
| - public function __setCloner(?\Closure $cloner = null): void |
155 |
| - { |
156 |
| - $this->__cloner__ = $cloner; |
157 |
| - } |
158 |
| - |
159 |
| - /** |
160 |
| - * {@inheritDoc} |
161 |
| - * @internal generated method: use only when explicitly handling proxy specific cloning logic |
162 |
| - */ |
163 |
| - public function __getCloner(): ?\Closure |
164 |
| - { |
165 |
| - return $this->__cloner__; |
166 |
| - } |
167 |
| - |
168 |
| - /** |
169 |
| - * {@inheritDoc} |
170 |
| - * @internal generated method: use only when explicitly handling proxy specific loading logic |
171 |
| - * @deprecated no longer in use - generated code now relies on internal components rather than generated public API |
172 |
| - * @static |
173 |
| - */ |
174 |
| - public function __getLazyProperties(): array |
175 |
| - { |
176 |
| - return self::$lazyPropertiesDefaults; |
177 |
| - } |
178 |
| - |
179 | 22 |
|
180 |
| - /** |
181 |
| - * {@inheritDoc} |
182 |
| - */ |
183 |
| - public function setIpAddress($ipAddress) |
184 |
| - { |
185 |
| - |
186 |
| - $this->__initializer__ && $this->__initializer__->__invoke($this, 'setIpAddress', [$ipAddress]); |
187 |
| - |
188 |
| - return parent::setIpAddress($ipAddress); |
189 |
| - } |
190 |
| - |
191 |
| - /** |
192 |
| - * {@inheritDoc} |
193 |
| - */ |
194 |
| - public function getIpAddress() |
195 |
| - { |
196 | 23 |
|
197 |
| - $this->__initializer__ && $this->__initializer__->__invoke($this, 'getIpAddress', []); |
| 24 | + private const LAZY_OBJECT_PROPERTY_SCOPES = [ |
| 25 | + "\0".parent::class."\0".'apiKey' => [parent::class, 'apiKey', null], |
| 26 | + "\0".parent::class."\0".'created_at' => [parent::class, 'created_at', null], |
| 27 | + "\0".parent::class."\0".'id' => [parent::class, 'id', null], |
| 28 | + "\0".parent::class."\0".'ip_address' => [parent::class, 'ip_address', null], |
| 29 | + "\0".parent::class."\0".'url' => [parent::class, 'url', null], |
| 30 | + 'apiKey' => [parent::class, 'apiKey', null], |
| 31 | + 'created_at' => [parent::class, 'created_at', null], |
| 32 | + 'id' => [parent::class, 'id', null], |
| 33 | + 'ip_address' => [parent::class, 'ip_address', null], |
| 34 | + 'url' => [parent::class, 'url', null], |
| 35 | + ]; |
198 | 36 |
|
199 |
| - return parent::getIpAddress(); |
200 |
| - } |
201 |
| - |
202 |
| - /** |
203 |
| - * {@inheritDoc} |
204 |
| - */ |
205 |
| - public function setUrl($url) |
206 |
| - { |
207 |
| - |
208 |
| - $this->__initializer__ && $this->__initializer__->__invoke($this, 'setUrl', [$url]); |
209 |
| - |
210 |
| - return parent::setUrl($url); |
211 |
| - } |
212 |
| - |
213 |
| - /** |
214 |
| - * {@inheritDoc} |
215 |
| - */ |
216 |
| - public function getUrl() |
217 |
| - { |
218 |
| - |
219 |
| - $this->__initializer__ && $this->__initializer__->__invoke($this, 'getUrl', []); |
220 |
| - |
221 |
| - return parent::getUrl(); |
222 |
| - } |
223 |
| - |
224 |
| - /** |
225 |
| - * {@inheritDoc} |
226 |
| - */ |
227 |
| - public function setCreatedAt($createdAt) |
228 |
| - { |
229 |
| - |
230 |
| - $this->__initializer__ && $this->__initializer__->__invoke($this, 'setCreatedAt', [$createdAt]); |
231 |
| - |
232 |
| - return parent::setCreatedAt($createdAt); |
233 |
| - } |
234 |
| - |
235 |
| - /** |
236 |
| - * {@inheritDoc} |
237 |
| - */ |
238 |
| - public function getCreatedAt() |
239 |
| - { |
240 |
| - |
241 |
| - $this->__initializer__ && $this->__initializer__->__invoke($this, 'getCreatedAt', []); |
242 |
| - |
243 |
| - return parent::getCreatedAt(); |
244 |
| - } |
245 |
| - |
246 |
| - /** |
247 |
| - * {@inheritDoc} |
248 |
| - */ |
249 |
| - public function getId() |
250 |
| - { |
251 |
| - if ($this->__isInitialized__ === false) { |
252 |
| - return parent::getId(); |
253 |
| - } |
254 |
| - |
255 |
| - |
256 |
| - $this->__initializer__ && $this->__initializer__->__invoke($this, 'getId', []); |
257 |
| - |
258 |
| - return parent::getId(); |
259 |
| - } |
260 |
| - |
261 |
| - /** |
262 |
| - * {@inheritDoc} |
263 |
| - */ |
264 |
| - public function setApiKey(\ApiSkeletons\Laravel\Doctrine\ApiKey\Entity\ApiKey $apiKey) |
| 37 | + public function __isInitialized(): bool |
265 | 38 | {
|
266 |
| - |
267 |
| - $this->__initializer__ && $this->__initializer__->__invoke($this, 'setApiKey', [$apiKey]); |
268 |
| - |
269 |
| - return parent::setApiKey($apiKey); |
| 39 | + return isset($this->lazyObjectState) && $this->isLazyObjectInitialized(); |
270 | 40 | }
|
271 | 41 |
|
272 |
| - /** |
273 |
| - * {@inheritDoc} |
274 |
| - */ |
275 |
| - public function getApiKey() |
| 42 | + public function __serialize(): array |
276 | 43 | {
|
| 44 | + $properties = (array) $this; |
| 45 | + unset($properties["\0" . self::class . "\0lazyObjectState"]); |
277 | 46 |
|
278 |
| - $this->__initializer__ && $this->__initializer__->__invoke($this, 'getApiKey', []); |
279 |
| - |
280 |
| - return parent::getApiKey(); |
| 47 | + return $properties; |
281 | 48 | }
|
282 |
| - |
283 | 49 | }
|
0 commit comments