public function __get($name) { if ($this->has($name)) { return $this->get($name); } else { return parent::__get($name); } }