Gets memcached option.

@param mixed $option
@param mixed $value

@return boolean

@link http://php.net/manual/en/memcached.getoption.php
970604
public function getOption($option)
    {
        if (false === is_int($option)) {
            $this->log('warning', sprintf('Unknown memcached option: `%s`.', $option));

            return false;
        }

        if (false === $this->_cache->getOption($option)) {
            return $this->_onError('getOption');
        }

        return true;
    }
771525
public function getOptionByValue($value)
    {
        // walk all options
        foreach ($this->options as $option) {
            if ($option instanceof Option) {
                if ($option->getValue() == $value) {
                    return $option;
                }
            } else {
                if ($option instanceof Optgroup) {
                    $options = $option->getOptions();
                    foreach ($options as $option2) {
                        if ($option2->getValue() == $value) {
                            return $option2;
                        }
                    }
                }
            }
        }

        return null;
    }
112825
public function setOption($option, $value)
    {
        $this->autoInitialize();

        return curl_setopt($this->curl, $option, $value);
    }
230481
public function setOption($option, $value)
    {
        switch ($option) {
            case FTPClient::TIMEOUT_SEC:
                if ($value <= 0) {
                    throw new Exception('Timeout value must be greater than zero');
                }
                break;

            case FTPClient::AUTOSEEK:
                if (!is_bool($value)) {
                    throw new Exception('Autoseek value must be boolean');
                }
                break;
            
            default:
                throw new Exception('Unsupported option');
                break;
        }

        return @ftp_set_option($this->connection, $option, $value);
    }
1201060
public function option($key, $value = null)
    {
        if (is_null($value)) {
            return $this->options[$key];
        }

        $this->options[$key] = $value;

        return $this;
    }
612112
private function getOption($option, array $options)
    {
        return isset($options[$option]) ? $options[$option] : $this->$option;
    }
642520
public function setOpt($option, $value, $_ch = null)
    {
        $ch = null === $_ch ? $this->curl : $_ch;
        $this->_options[$option] = $value;

        return curl_setopt($ch, $option, $value);
    }
1169563
public function getOptionForValue($value) : IFieldOption
    {
        foreach ($this->getAll() as $option) {
            if (ValueHasher::areEqual($value, $option->getValue())) {
                return $option;
            }
        }

        throw InvalidArgumentException::format('Invalid value supplied to %s', __METHOD__);
    }
85942
protected function setItem(string $key, string $value, int $expiration)
    {
        if ($this->memcache instanceof \Memcached) {
            return $this->memcache->set($key, $value, $expiration);
        }
        return $this->memcache->set($key, $value, $this->flags, $expiration);
    }
47905
public function getOption($option)
    {
        switch ($option) {
            case FTPClient::TIMEOUT_SEC:
            case FTPClient::AUTOSEEK:
                $result = @ftp_get_option($this->connection, $option);

                return $result;
                break;
            
            default:
                throw new Exception('Unsupported option');
                break;
        }
    }
323790
public function options($option, $value=null) 
    {
        if (is_array($option)) {
            foreach ($option as $k=>$v) {
                $this->options($k, $v);
            }
        } else {
            // 兼容转换
            if ($option === 'cookies') {
                $option = 'cookie';
            } elseif ($option === 'headers') {
                $option = 'header';
            }
            
            if (array_key_exists($option, $this->def)) {
                if (method_exists($this, $option)) {
                    $this->$option($value);
                }
            } else {
                $this->options[strtoupper($option)] = $value;
            }
        }
        return $this;
    }
1295193
public function Get($option)
    {
        if(isset($this->preferences[$option]))
        {
            return $this->preferences[$option];
        }

        return false;
    }
626558
public function clean($option = [])
    {
        if ($this->active) {
            return $this->phpFastCache->instance->clean($option);
        }

        return false;
    }
1069616
public function set($key, $value, $ttl)
    {
        if ($this->safe) {
            return $this->memcache->set($key, $value, false, $ttl);
        }

        return false;
    }
663232
protected function cache($key, $value)
    {
        if (array_has($this->model_cache, $key)) {
            return array_get($this->model_cache, $key);
        }

        if (is_callable($value)) {
            $result = $value();
        } else {
            $result = $value;
        }

        array_set($this->model_cache, $key, $result);

        return $result;
    }
593397
public function get($key)
    {
        $value = $this->memcached->get($this->prefix.$key);

        if ($this->memcached->getResultCode() == 0) {
            return $value;
        }
    }
600771
public function set($key, $value, $ttl = self::DEFAULT_TTL)
    {
        if (!$this->hasConnection()) {
            // @codeCoverageIgnoreStart
            return false;
            // @codeCoverageIgnoreEnd
        }

        $flag = null;

        if (!is_bool($value) && !is_int($value) && !is_float($value)) {
            $flag = MEMCACHE_COMPRESSED;
        }

        try {
            return $this->memcache->set($key, $value, $flag, $ttl);
        // @codeCoverageIgnoreStart
        } catch (\Exception $e) {
        }

        return false;
        // @codeCoverageIgnoreEnd
    }