function __get($var) { if (!isset($this->packagename)) { throw new \PEAR2\Pyrus\Registry\Exception('Attempt to retrieve ' . $var . ' from unknown package'); } return parent::__get($var); }