public function __get($name)
{
if (array_key_exists($name, $this->attributes)) {
if ($name === 'subtype' && $this->attributes['guid']) {
_elgg_services()->logger->warn('Reading ->subtype on a persisted entity is unreliable.');
}
return $this->attributes[$name];
}
return $this->getMetadata($name);
}
/** * Wrapper around \ElggEntity::__get() * * @see \ElggEntity::__get() * * @param string $name Name * @return mixed * @todo deprecate appending group to username. Was a hack used for creating * URLs for group content. We stopped using the hack in 1.8. */ public function __get($name) { if ($name == 'username') { return 'group:' . $this->getGUID(); } return parent::__get($name); }