_entityPersister = $entityPersister; $this->_identifier = $identifier; } /** @private */ public function __load() { if (!$this->__isInitialized__ && $this->_entityPersister) { $this->__isInitialized__ = true; if (method_exists($this, "__wakeup")) { // call this after __isInitialized__to avoid infinite recursion // but before loading to emulate what ClassMetadata::newInstance() // provides. $this->__wakeup(); } if ($this->_entityPersister->load($this->_identifier, $this) === null) { throw new \Doctrine\ORM\EntityNotFoundException(); } unset($this->_entityPersister, $this->_identifier); } } public function getId() { $this->__load(); return parent::getId(); } public function setName($name) { $this->__load(); return parent::setName($name); } public function getName() { $this->__load(); return parent::getName(); } public function setDescription($description) { $this->__load(); return parent::setDescription($description); } public function getDescription() { $this->__load(); return parent::getDescription(); } public function setUsrId($usrId) { $this->__load(); return parent::setUsrId($usrId); } public function getUsrId() { $this->__load(); return parent::getUsrId(); } public function setPusherId($pusherId) { $this->__load(); return parent::setPusherId($pusherId); } public function getPusherId() { $this->__load(); return parent::getPusherId(); } public function setArchived($archived) { $this->__load(); return parent::setArchived($archived); } public function getArchived() { $this->__load(); return parent::getArchived(); } public function setCreated($created) { $this->__load(); return parent::setCreated($created); } public function getCreated() { $this->__load(); return parent::getCreated(); } public function setUpdated($updated) { $this->__load(); return parent::setUpdated($updated); } public function getUpdated() { $this->__load(); return parent::getUpdated(); } public function addBasketElement(\Entities\BasketElement $elements) { $this->__load(); return parent::addBasketElement($elements); } public function getElements() { $this->__load(); return parent::getElements(); } public function setPusher(\User_Adapter $user) { $this->__load(); return parent::setPusher($user); } public function getPusher() { $this->__load(); return parent::getPusher(); } public function setOwner(\User_Adapter $user) { $this->__load(); return parent::setOwner($user); } public function getOwner() { $this->__load(); return parent::getOwner(); } public function setValidation(\Entities\ValidationSession $validation) { $this->__load(); return parent::setValidation($validation); } public function getValidation() { $this->__load(); return parent::getValidation(); } public function setIsRead($isRead) { $this->__load(); return parent::setIsRead($isRead); } public function getIsRead() { $this->__load(); return parent::getIsRead(); } public function hasRecord(\record_adapter $record) { $this->__load(); return parent::hasRecord($record); } public function getSize() { $this->__load(); return parent::getSize(); } public function __sleep() { return array('__isInitialized__', 'id', 'name', 'description', 'usr_id', 'is_read', 'pusher_id', 'archived', 'created', 'updated', 'validation', 'elements'); } public function __clone() { if (!$this->__isInitialized__ && $this->_entityPersister) { $this->__isInitialized__ = true; $class = $this->_entityPersister->getClassMetadata(); $original = $this->_entityPersister->load($this->_identifier); if ($original === null) { throw new \Doctrine\ORM\EntityNotFoundException(); } foreach ($class->reflFields AS $field => $reflProperty) { $reflProperty->setValue($this, $reflProperty->getValue($original)); } unset($this->_entityPersister, $this->_identifier); } } }