@author Vova Feldman (@svovaf)
@since  1.0.3

@param string $option
@param mixed  $value
@param bool   $flush
332799
function set_option( $option, $value, $flush = false ) {
            $this->_logger->entrance( 'option = ' . $option );

            if ( ! $this->is_loaded() ) {
                $this->clear();
            }

            /**
             * If it's an object, store a clone of the object, otherwise,
             * external changes of the object will actually change the value
             * of the object in the options manager which may lead to an unexpected
             * behaviour and data integrity when a store() call is triggered.
             *
             * Example:
             *      $object1    = new stdClass();
             *      $object1->x = 123;
             *
             *      $options->set_option( 'object1', $object1 );
             *
             *      $object1->x = 456;
             *
             *      $options->set_option( 'object2', $object2, true );
             *
             * If we don't set the option as a clone of option 'object1', setting 'object2'
             * will also store the updated value of 'object1' ($object1->x = 456 instead of
             * $object1->x = 123) which is quite not an expected behaviour.
             *
             * @author Vova Feldman
             */
            $copy = is_object( $value ) ? clone $value : $value;

            if ( is_array( $this->_options ) ) {
                $this->_options[ $option ] = $copy;
            } else if ( is_object( $this->_options ) ) {
                $this->_options->{$option} = $copy;
            }

            if ( $flush ) {
                $this->store();
            }
        }
638413
public function setOption($option, $value)
    {
        if ($this->isValidOption($option)) {
            $this->options[$option] = $value;
        }

        return $this;
    }
1336503
public static function Set($option, $value)
    {
        self::CheckBackend();

        self::$backend->Set($option, $value);
    }
41420
public function setOption($option, $value = null)
    {
        if (is_array($option)) {
            $this->options += $option;
        } else {
            $this->options[$option] = $value;
        }

        return $this;
    }
1300726
public function setOpt($option, $value)
    {
        $required_options = array(
            CURLOPT_RETURNTRANSFER => 'CURLOPT_RETURNTRANSFER',
        );

        if (in_array($option, array_keys($required_options), true) && !($value === true)) {
            trigger_error($required_options[$option] . ' is a required option', E_USER_WARNING);
        }

        $success = curl_setopt($this->curl, $option, $value);
        if ($success) {
            $this->options[$option] = $value;
        }
        return $success;
    }
463679
public function maybeChecked($value = null, $default_value = null, $option = null)
    {
        if (is_array($value) && in_array($option, $value)) {
            return 'checked="checked"';
        }

        return false;
    }
1315273
public function setOption($option, $value)
    {
        if (false === is_int($option)) {
            $this->log('warning', sprintf('Unknown memcached option: `%s`.', $option));

            return false;
        }

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

        return true;
    }
310485
public function setSelectedByValue($value)
    {
        $x = 0;
        foreach ($this->options as $idx => $data) {
            if ($value == $data) {
                $this->setSelectedIndex($x);

                return;
            }
            $x++;
        }

        $this->setSelectedIndex(-1);
    }
416680
public function setOption($option, $value) {
    // The only option we allow to be changed is OPT_PREFIX_KEY
    if ($option == self::OPT_PREFIX_KEY) {
      $this->options[$option] = $value;
      return true;
    }
    return false;
  }
22209
protected function prepareValue($value)
    {
        switch (gettype($value)) {
            case OptionInterface::TYPE_BOOLEAN:
                return ($value) ? 'true' : 'false';
            case OptionInterface::TYPE_NUMBER:
                return $value;
            case OptionInterface::TYPE_STRING:
                return "'" . $value . "'";
        }
    }
1199892
public function addOption(string $option, $value = null, string $glue = '=') : Executable
    {
        if ($value !== null) {
            // force space for multiple arguments e.g. --option 'foo' 'bar'
            if (is_array($value)) {
                $glue = ' ';
            }
            $value = $glue . $this->escapeArgument($value);
        } else {
            $value = '';
        }
        $this->options[] = $option . $value;

        return $this;
    }
1074978
public function setOption($option, $value)
    {
        if (! (@ldap_set_option($this->connection, $option, $value))) {
            $code = @ldap_errno($this->connection);
            throw new OptionException(
                sprintf(
                    'Could not change option %s value: Ldap Error Code=%s - %s',
                    $code,
                    ldap_err2str($code)
                )
            );
        }
    }
359510
function load( $flush = false ) {
            $this->_logger->entrance();

            $option_name = $this->get_option_manager_name();

            if ( $flush || ! isset( $this->_options ) ) {
                if ( isset( $this->_options ) ) {
                    // Clear prev options.
                    $this->clear();
                }

                $cache_group = $this->get_cache_group();

                if ( ! WP_FS__DEBUG_SDK ) {

                    $this->_options = wp_cache_get(
                        $option_name,
                        $cache_group
                    );
                }

                $cached = true;

                if ( empty( $this->_options ) ) {
                    if ( $this->_is_network_storage ) {
                        $this->_options = get_site_option( $option_name );
                    } else if ( $this->_blog_id > 0 ) {
                        $this->_options = get_blog_option( $this->_blog_id, $option_name );
                    } else {
                        $this->_options = get_option( $option_name );
                    }

                    if ( is_string( $this->_options ) ) {
                        $this->_options = json_decode( $this->_options );
                    }

//					$this->_logger->info('get_option = ' . var_export($this->_options, true));

                    if ( false === $this->_options ) {
                        $this->clear();
                    }

                    $cached = false;
                }

                if ( ! WP_FS__DEBUG_SDK && ! $cached ) {
                    // Set non encoded cache.
                    wp_cache_set( $option_name, $this->_options, $cache_group );
                }
            }
        }
881319
public function setOption(int $option, mixed $value)
    {
        curl_setopt($this->curl, $option, $value);
    }
1343413
public function setOption($optionName, $value)
    {
        $this->fusionPath = null;
        parent::setOption($optionName, $value);
    }
131845
public function SetGroupValue($group, $option, $value)
    {
        $this->preferences[$group][$option] = $value;

        $this->Write();
    }
1011616
public function set($value, $option = null, bool $replace = true)
    {
        if (is_array($value)) {
            if (empty($this->values)) {
                $this->values = $value;
            } else {
                $replace ? $this->replace($value) : $this->merge($value);
            }
        } else {
            $this->add($value, $option);
        }

        return $this;
    }