Configure options
Options include
- timeout_socket       => int, seconds, default 5

@param array $options
@return void
973824
protected function configure(array $options): void
    {
        $options = array_merge([
            'timeout_socket' => self::TIMEOUT_SOCKET,
        ], $options);

        parent::configure($options);
    }
575280
public function setOptions($options)
    {
        $this->options = [
            'config_dir' => null,
            'cache_dir' => null,
            'debug' => false,
            'cache_class' => 'WebspaceCollectionCache',
            'base_class' => 'WebspaceCollection',
        ];

        // overwrite the default values with the given options
        $this->options = array_merge($this->options, $options);
    }
947415
protected function configureURL(array $options)
    {
        $url = $this->getEndPointUrl();
        if ($this->requiresOptions()) {
            $urlArr = explode("/",$url);
            $optional = FALSE;
            $optionNum = 0;
            $keys = array_keys($options);
            sort($keys);
            foreach($keys as $key){
                if (is_numeric($key)){
                    $optionNum = $key;
                    break;
                }
            }
            foreach($urlArr as $key => $urlPart){
                $replace = NULL;
                if (strpos($urlPart,static::$_URL_VAR_CHARACTER) !== FALSE){
                    if (strpos($urlPart,':') !== FALSE){
                        $optional = TRUE;
                        $replace = '';
                    }
                    $opt = str_replace(array(static::$_URL_VAR_CHARACTER,':'),'',$urlPart);
                    if (isset($options[$opt])){
                        $replace = $options[$opt];
                    }
                    if (isset($options[$optionNum]) && ($replace == '' || $replace == NULL)){
                        $replace = $options[$optionNum];
                        $optionNum = $optionNum+1;
                    }
                    if ($optional && $replace == ''){
                        $urlArr = array_slice($urlArr,0,$key);
                        break;
                    }
                    if ($replace !== NULL){
                        $urlArr[$key] = $replace;
                    }
                }
            }
            $url = implode("/",$urlArr);
            $url = rtrim($url,"/");
        }
        return $url;
    }
149356
public function setOptions( array $options )
    {
        foreach ( $this->defaults as $option => $defaults ) {
            $this->values[$option] = ( array_key_exists($defaults['name'], $options) ) ? $options[$option] : $defaults['default'];
        }
    }
870371
protected function setBodyOptions(array &$options):void{
		$body     = $this->request->getBody();
		$bodySize = $body->getSize();

		if($bodySize === 0){
			return;
		}

		if($body->isSeekable()){
			$body->rewind();
		}

		// Message has non empty body.
		if($bodySize === null || $bodySize > 1 << 20){
			// Avoid full loading large or unknown size body into memory
			$options[\CURLOPT_UPLOAD] = true;

			if($bodySize !== null){
				$options[\CURLOPT_INFILESIZE] = $bodySize;
			}

			$options[\CURLOPT_READFUNCTION] = [$this, 'readfunction'];
		}
		// Small body can be loaded into memory
		else{
			$options[\CURLOPT_POSTFIELDS] = (string)$body;
		}

	}
1077659
public function setOptions(array $options) {
		if(isset($options['data_type']))
			$this->data_type = $options['data_type'];
		if(isset($options['default']))
			$this->value = $options['default'];
		if(isset($options['widget']))
			$this->widget = $options['widget'];

		$this->options = array_merge_recursive($this->options, $options);

		return $this;
	}
383324
public function setOptions($options)
    {
        // Adding hosts.
        if (!empty($options['hosts'])) {
            foreach ($options['hosts'] as $host => $port) {
                $this->addserver($host, $port, false);
            }
        } else {
            $this->addserver('127.0.0.1', '11211', false);
        }
    }
136194
public function addOptions( $options ) {
		foreach ( $options as $key => $option ) {
			if ( is_int( $key ) ) {
				$this->addOption( $option );
			} else {
				$this->addOption( $key, $option );
			}
		}
	}
785762
public function setOptions($options = [])
    {
        $default = [
            'dsn'             => null,
            'username'        => null,
            'password'        => null,
            'driver_options'  => null,
            'table_prefix'    => null,
            'fetch_mode'      => \PDO::FETCH_OBJ,
            'session_key'     => 'CDatabase',
            'verbose'         => null,
            'debug_connect'   => false,
        ];
        $this->options = array_merge($default, $options);

        if ($this->options['table_prefix']) {
            $this->setTablePrefix($this->options['table_prefix']);
        }

        if ($this->options['dsn']) {
            $dsn = explode(':', $this->options['dsn']);
            $this->setSQLDialect($dsn[0]);
        }
    }
217707
protected function setOptions($options)
	{
		// Set name
		if (isset($options['name']))
		{
			session_name(md5($options['name']));
		}

		// Set id
		if (isset($options['id']))
		{
			session_id($options['id']);
		}

		// Set expire time
		if (isset($options['expire']))
		{
			$this->expire = $options['expire'];
		}

		// Get security options
		if (isset($options['security']))
		{
			$this->security = explode(',', $options['security']);
		}

		if (isset($options['force_ssl']))
		{
			$this->force_ssl = (bool) $options['force_ssl'];
		}

		if (isset($options['cookie_domain']))
		{
			$this->cookie_domain = (string) $options['cookie_domain'];
		}

		if (isset($options['cookie_path']))
		{
			$this->cookie_path = (string) $options['cookie_path'];
		}

		// Sync the session maxlifetime
		ini_set('session.gc_maxlifetime', $this->expire);

		return true;
	}
341066
protected function setOptions($options)
    {
        foreach (array('directory', 'path', 'ignore', 'allowed_errors') as $key) {
            if (array_key_exists($key, $options)) {
                $this->{$key} = $options[$key];
            }
        }
    }
722060
protected function convertSocketTimeout(array $options)
    {
        if (isset($options['timeout']) && ! isset($options['socketTimeoutMS'])) {
            $options['socketTimeoutMS'] = $options['timeout'];
            unset($options['timeout']);
        }

        return $options;
    }
443062
public function setOptions(array $options)
    {
        $limit = array_get($options, static::OPT_LIMIT);

        if (!empty($limit)) {
            $this->setHeaders(['x-ms-max-item-count' => $limit]);
        }
    }
703059
public function addOptions(array $options = []): void
    {
        foreach ($options as $name => $opt) {
            $opt = $this->mergeArgOptConfig($opt);
            $this->addOption($name, $opt['mode'], $opt['description'], $opt['default']);
        }
    }
143898
public function setOptions(array $options)
    {
        parent::setOptions($options);

        if ($this->hasOption('min') && $this->hasOption('max') ) {
            $this->setMessage(__('Invalid file size (minimum %1$s bytes, maximum %2$s bytes)', $this->getOption('min'), $this->getOption('max')));
        } elseif ($this->hasOption('max')) {
            $this->setMessage(__('The uploaded file is too large (maximum %s bytes)', $this->getOption('max')));
            $this->setOption('min', 0);
        } else {
            throw new common_Exception("Please set 'min' and/or 'max' options!");
        }
    }
300358
public function SetOptions( $options ){
		foreach($options as $option => $value){
			$this->SetOption($option,$value);
		}
	}
316326
public function config(array $options)
    {
        foreach ($options as $key => $value) {
            $method = 'set' . $key;
            if (method_exists($this, $method)) {
                call_user_func(array($this, $method), $value);
            }
        }
    }