Šä’ßlųl.Śl;x/Śl°8&Ślę’ßlØóó3Śl+ Ų<Śl!‚8y6ŚlpÖ6ŚlXģ6Śl ƒ7ŚlČ:><ŚlĄ8&Ślm.Śl(p6Ślę’ßlū€4Śl*@E<Śl!‚čż4ŚlpÖ6ŚlHķ6Śl`ƒ7Śl8 ž:ŚlŠ8&Ślm.Ślą8&Ślę’ßl  ę’ßl  Ÿ:Śl ‚ ā1ŚlpÖ6Śl8ī6Śl€<ŚlČEFŚlš8&Ślm.ŚlĄę1Ślę’ßl+@ž4Śl- FŚl ‚^:ŚlpÖ6Śl(ļ6ŚlĄ<Ślą* Ślm.Ślp]:Ślę’ßl06ą½1Śl€- Śl ‚ˆ^:ŚlpÖ6Ślš6Śl€<Śl€5Śl m.Śl9&Ślę’ßl;=@¾1Śl 5Ślå6Śl…hAą’’’—:Śl €š;ą/²Už’’’ą,ū/²U€š’’’Ž9Śl€ctions\a`õ0²UPļõßlvŹNŚl€o5Śl@Ö9Śl8å6ŚlüPu«AĄŲ9Śl8å6ŚlüA!‚€ü4Śl8å6Śl€<Śl€Ü8Śl9&Śl8m.ŚlPļõßl++õ3ŚlŻ8ŚlA!‚0ģ1Śl8å6Ślą<Śl Ż8Śl 9&Śl@m.ŚlPļõßl44Ś9Śl Ż8ŚlA!‚`ģ1Śl8å6Śl@‘<ŚlĄŻ8Śl09&ŚlHm.ŚlPļõßl<<i5Śl@Ž8ŚlA!‚€<Śl8å6Śl j5Śl€1:Śl{.ŚlPm.ŚlPļõßlGG€9Śl 2:ŚlA!‚Ą]:Śl8å6Śl ‘<Śl`Ž8Śl@9&ŚlXm.ŚlPļõßlQQ@Ū9ŚląŽ8ŚlA!‚˜]:Śl8å6ŚląÉ1ŚlĄ2Ślhm.Śl`m.ŚlPļõßlZZŸ4Śl 2ŚlA!‚H]:Śl8å6Śl ƒ7Śl0 2Ślxm.Ślpm.ŚlPļõßlaa€i5Śl 2ŚlA ‚ ė1Śl8å6Śl <Śl»PŚl€m.ŚlPļõßlii0:ŚlŠ»PŚlA ‚Øw6Śl8å6Śl@ <Ślą¦OŚlˆm.ŚlPļõßloo°2Śl §OŚlakeup'); return function (CommonProxy $proxy) use($entityPersister, $classMetadata, $wakeupProxy) : void { $initializer = $proxy->__getInitializer(); $cloner = $proxy->__getCloner(); $proxy->__setInitializer(null); $proxy->__setCloner(null); if ($proxy->__isInitialized()) { return; } $properties = $proxy->__getLazyProperties(); foreach ($properties as $propertyName => $property) { if (!isset($proxy->{$propertyName})) { $proxy->{$propertyName} = $properties[$propertyName]; } } $proxy->__setInitialized(\true); if ($wakeupProxy) { $proxy->__wakeup(); } $identifier = $classMetadata->getIdentifierValues($proxy); if ($entityPersister->loadById($identifier, $proxy) === null) { $proxy->__setInitializer($initializer); $proxy->__setCloner($cloner); $proxy->__setInitialized(\false); throw EntityNotFoundException::fromClassNameAndIdentifier($classMetadata->getName(), $this->identifierFlattener->flattenIdentifier($classMetadata, $identifier)); } }; } private function createLazyInitializer(ClassMetadata $classMetadata, EntityPersister $entityPersister) : Closure { return function (Proxy $proxy) use($entityPersister, $classMetadata) : void { $identifier = $classMetadata->getIdentifierValues($proxy); $entity = $entityPersister->loadById($identifier, $proxy->__isCloning ? null : $proxy); if ($entity === null) { throw EntityNotFoundException::fromClassNameAndIdentifier($classMetadata->getName(), $this->identifierFlattener->flattenIdentifier($classMetadata, $identifier)); } if (!$proxy->__isCloning) { return; } $class = $entityPersister->getClassMetadata(); foreach ($class->getReflectionProperties() as $property) { if (!$class->hasField($property->name) && !$class->hasAssociation($property->name)) { continue; } $property->setAccessible(\true); $property->setValue($proxy, $property->getValue($entity)); } }; } private function createCloner(ClassMetadata $classMetadata, EntityPersister $entityPersister) : Closure { return function (CommonProxy $proxy) use($entityPersister, $classMetadata) : void { if ($proxy->__isInitialized()) { return; } $proxy->__setInitialized(\true); $proxy->__setInitializer(null); $class = $entityPersister->getClassMetadata(); $identifier = $classMetadata->getIdentifierValues($proxy); $original = $entityPersister->loadById($identifier); if ($original === null) { throw EntityNotFoundException::fromClassNameAndIdentifier($classMetadata->getName(), $this->identifierFlattener->flattenIdentifier($classMetadata, $identifier)); } foreach ($class->getReflectionProperties() as $property) { if (!$class->hasField($property->name) && !$class->hasAssociation($property->name)) { continue; } $property->setAccessible(\true); $property->setValue($proxy, $property->getValue($original)); } }; } private function generateUseLazyGhostTrait(ClassMetadata $class) : string { $code = ProxyHelper::generateLazyGhost($class->getReflectionClass()); $code = substr($code, 7 + (int) strpos($code, "\n{")); $code = substr($code, 0, (int) strpos($code, "\n}")); $code = str_replace('LazyGhostTrait;', str_replace("\n ", "\n", 'LazyGhostTrait { initializeLazyObject as __load; setLazyObjectAsInitialized as public __setInitialized; isLazyObjectInitialized as private; createLazyGhost as private; resetLazyObject as private; __clone as private __doClone; }'), $code); return $code; } private function generateSkippedProperties(ClassMetadata $class) : string { $skippedProperties = ['__isCloning' => \true]; $identifiers = array_flip($class->getIdentifierFieldNames()); $filter = ReflectionProperty::IS_PUBLIC | ReflectionProperty::IS_PROTECTED | ReflectionProperty::IS_PRIVATE; $reflector = $class->getReflectionClass(); while ($reflector) { foreach ($reflector->getProperties($filter) as $property) { $name = $property->getName(); if ($property->isStatic() || ($class->hasField($name) || $class->hasAssociation($name)) && !isset($identifiers[$name])) { continue; } $prefix = $property->isPrivate() ? "\x00" . $property->getDeclaringClass()->getName() . "\x00" : ($property->isProtected() ? "\x00*\x00" : ''); $skippedProperties[$prefix . $name] = \true; } $filter = ReflectionProperty::IS_PRIVATE; $reflector = $reflector->getParentClass(); } uksort($skippedProperties, 'strnatcmp'); $code = VarExporter::export($skippedProperties); $code = str_replace(VarExporter::export($class->getName()), 'parent::class', $code); $code = str_replace("\n", "\n ", $code); return $code; } private function generateSerializeImpl(ClassMetadata $class) : string { $reflector = $class->getReflectionClass(); $properties = $reflector->hasMethod('__serialize') ? 'parent::__serialize()' : '(array) $this'; $code = '$properties = ' . $properties . '; unset($properties["\\0" . self::class . "\\0lazyObjectState"], $properties[\'__isCloning\']); '; if ($reflector->hasMethod('__serialize') || !$reflector->hasMethod('__sleep')) { return $code . 'return $properties;'; } return $code . '$data = []; foreach (parent::__sleep() as $name) { $value = $properties[$k = $name] ?? $properties[$k = "\\0*\\0$name"] ?? $properties[$k = "\\0' . $reflector->getName() . '\\0$name"] ?? $k = null; if (null === $k) { trigger_error(sprintf(\'serialize(): "%s" returned as member variable from __sleep() but does not exist\', $name), \\E_USER_NOTICE); } else { $data[$k] = $value; } } return $data;'; } }