/** * PHP setter magic method. * This method is overridden so that config keys can be accessed like properties. * @param string $name property name * @param mixed $value property value * @return mixed */ public function __set($name, $value) { if ($name != 'configs' && $this->setConfig($name, $value) !== false) { return true; } return parent::__set($name, $value); }
/** * PHP unset magic method. * This is a PHP magic method that we override to allow using unset() to set a config key to be null. * * @param string $name the property name or the event name * @return mixed */ public function __unset($name) { if (isset($this->_configs[$name])) { $this->setConfig($name, null); } else { parent::__unset($name); } }