/** * Magic __get method * * @param string $name * @return mixed */ public function __get($name) { return is_object($this->object) && isset($this->object()->{$name}) ? $this->object()->{$name} : parent::__get($name); }
/** * Magic __get method * * @param string $name * @return mixed */ public function __get($name) { return isset($this->{$name}) ? $this->{$name} : parent::__get($name); }