Add configuration and write data in json format.

Parameters

  • string $key (server)
  • string $value value of key
  • boolean|string $options [optional]

Returns

mixed Returns all settings if `$key` and `$value` aren't set. The only option for `$key` right now is 'server'. Returns the bytes written to the configuration file.

Source

						public function config($key = null, $value = null, $options = true) {
		if (empty($key) || empty($value)) {
			return $this->_settings;
		}
		switch ($key) {
			case 'server':
				$this->_settings['servers'][$value] = $options;
			break;
		}
		return file_put_contents($this->conf, json_encode($this->_settings));
	}