public function __get($attributeName) { if ($this->isEveryone) { if ($attributeName == 'group') { return null; } if ($attributeName == 'groups') { return array(); } } if ($this->isSuperAdministrators) { if ($attributeName == 'rights') { throw new NotSupportedException(); } } return parent::__get($attributeName); }