/** * Override the __get method. * * @param string $key * @return EntryPresenter|mixed */ public function __get($key) { if ($key === 'decorated') { return $this->getPresenter(); } return parent::__get($key); // TODO: Change the autogenerated stub }
/** * Get the attribute from the parent * if it does not exist here. * * @param string $key * @return mixed */ public function __get($key) { $value = parent::__get($key); if (!$value && ($parent = $this->getParent())) { return $parent->{$key}; } return $value; }