_entityPersister = $entityPersister; $this->_identifier = $identifier; } private function _load() { if (!$this->__isInitialized__ && $this->_entityPersister) { $this->__isInitialized__ = true; if ($this->_entityPersister->load($this->_identifier, $this) === null) { throw new \Doctrine\ORM\EntityNotFoundException(); } unset($this->_entityPersister, $this->_identifier); } } public function setType($type) { $this->_load(); return parent::setType($type); } public function getId() { $this->_load(); return parent::getId(); } public function setTitle($title) { $this->_load(); return parent::setTitle($title); } public function getTitle() { $this->_load(); return parent::getTitle(); } public function addComment(\Timestampable\Fixture\Comment $comment) { $this->_load(); return parent::addComment($comment); } public function getComments() { $this->_load(); return parent::getComments(); } public function getCreated() { $this->_load(); return parent::getCreated(); } public function getPublished() { $this->_load(); return parent::getPublished(); } public function getUpdated() { $this->_load(); return parent::getUpdated(); } public function __sleep() { return array('__isInitialized__', 'id', 'title', 'comments', 'created', 'updated', 'published', 'type'); } }