Gdn_SQLDriver::options PHP Method

options() public method

Gets/sets an option on the object.
public options ( string $Key, mixed $Value = null ) : mixed
$Key string The key of the option.
$Value mixed The value of the option or not specified just to get the current value.
return mixed The value of the option or $this if $Value is specified.
    public function options($Key, $Value = null)
    {
        if (is_array($Key)) {
            foreach ($Key as $K => $V) {
                $this->_Options[$K] = $V;
                return $this;
            }
        } elseif ($Value !== null) {
            $this->_Options[$Key] = $Value;
            return $this;
        } elseif (isset($this->_Options[$Key])) {
            return $this->_Options[$Key];
        } else {
            return null;
        }
    }