_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 getId() { $this->_load(); return parent::getId(); } public function getSlug() { $this->_load(); return parent::getSlug(); } public function setTitle($title) { $this->_load(); return parent::setTitle($title); } public function getTitle() { $this->_load(); return parent::getTitle(); } public function setParent(\Tree\Fixture\BehavioralCategory $parent) { $this->_load(); return parent::setParent($parent); } public function getParent() { $this->_load(); return parent::getParent(); } public function __sleep() { return array('__isInitialized__', 'id', 'title', 'lft', 'rgt', 'parent', 'children', 'slug'); } }