/** * Implements getter functionality for properties defined in the settings section. */ public function __get($name) { if (is_array($this->settings) && array_key_exists($name, $this->settings)) { return $this->settings[$name]; } return parent::__get($name); }
/** * Implements getter functionality for visible properties defined in * the settings section or view bag array. */ public function __get($name) { $visibleKeys = array_flip($this->visible); if (isset($visibleKeys[$name])) { if (is_array($this->settings) && array_key_exists($name, $this->settings)) { return $this->settings[$name]; } if (is_array($this->viewBag) && array_key_exists($name, $this->viewBag)) { return $this->viewBag[$name]; } } return parent::__get($name); }