_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); unset($this->_identifier); } } public function getValue() { $this->_load(); return parent::getValue(); } public function getTimestamp() { $this->_load(); return parent::getTimestamp(); } public function getChannel() { $this->_load(); return parent::getChannel(); } public function __sleep() { if (!$this->__isInitialized__) { throw new \RuntimeException("Not fully loaded proxy can not be serialized."); } return array('timestamp', 'value', 'channel'); } }