option = preg_replace("/^com_/", '', $option); } /** * Getter to access component settings. * * @param string $key The name of the property. * @param mixed $def The default value (optional) if none is set. * * @return mixed The value of the configuration. */ public function get($key, $def = null) { return JFactory::getApplication()->get($this->option . '.' . $key, $def); } /** * Setter to insert or update component settings. * * @param string $key The name of the property. * @param mixed $val The value of the property to set (optional). * * @return mixed Previous value of the property. */ public function set($key, $val) { return JFactory::getApplication()->set($this->option . '.' . $key, $val); } }