/** * (non-PHPdoc) * @see ElggEntity::__get() */ public function __get($name) { if ($name === 'title') { $question = $this->getContainerEntity(); return elgg_echo('questions:object:answer:title', [$question->title]); } return parent::__get($name); }
/** * Get an attribute or private setting value * * @param string $name Name of the attribute or private setting * @return mixed */ public function __get($name) { // See if its in our base attribute if (array_key_exists($name, $this->attributes)) { return parent::__get($name); } return $this->getPrivateSetting($name); }