public function __get($name) { switch ($name) { case 'poDef': if (is_null($this->_poDef)) { $pos = ezcPersistentSessionInstance::get(); $this->_poDef = $pos->definitionManager->fetchDefinition($this->poClass); } return $this->_poDef; case 'schema': if (is_null($this->_schema)) { $this->_schema = ezcDbSchema::createFromDb(ezcDbInstance::get()); } return $this->_schema; } return parent::__get($name); }