Set page options.

@param array $options
336165
public function setOptions(array $options = array())
    {
        $options['inited'] = true;

        // Resolve merged options
        $resolver = new OptionsResolver();
        $this->configureOptions($resolver);
        $options = $resolver->resolve($options);
        $this->options = array_merge($this->options, $options);

        if (empty($this->options['blocks']['header'])) {
            $this->options['header'] = false;
        }

        if (!$this->options['header']) {
            $this->options['css'] = trim($this->options['css'].' no page header');
        }

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

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

        if ($seo = $this->seoPage) {
            $seo->setTitle($this->options['title']);
            $seo->addHtmlAttributes('lang', $this->options['locale']);

            if ($this->options['canonical']) {
                $seo->setLinkCanonical($this->options['canonical']);
            }

            foreach ($this->options['metas'] as $key => $value) {
                if (is_array($value)) {
                    foreach ($value as $k => $v) {
                        $seo->addMeta('property', $k, $v);
                    }
                } else {
                    $seo->addMeta('name', $key, $value);
                }
            }
        }
    }
205457
public function setOptions(array $options)
    {
        $this->options = [];

        foreach ($options as $k => $v) {
            $this->addOption($k, (array)$v);
        }

        return $this;
    }
722229
public function setOptions($options) {
		$this->renderer->getElement()->setOptions($options);
		$this->renderer->getHtmlElement()->setOptions($options);
	}
440498
public function setup(array $options)
    {
        foreach ($options as $method => $value) {
            $method = 'set' . ucfirst($method);
            if (method_exists($this, $method)) {
                $this->{$method}($value);
            }
        }
    }
123350
public function setOptions(array $options): Options
    {
        foreach ($options as $key => $option) {
            $this->options[$key] = $option;
        }

        return $this;
    }
349666
public function setOptions(array $options)
    {
        if ($options) {
            foreach ($options as $k => $v) {
                if (in_array($k, ['session'])) {
                    $this->getTokenInstance()->setOptions($k, $v);
                }
            }
            
            $this->getImageHandler()->setOptions($options);
        }
        
        return $this;
    }
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;
	}
1186496
public function setOptions(array $options)
    {
        $availableOptions = [
            'default',
            'group',
            'key',
            'message',
            'messages',
            'rules'
        ];

        foreach ($availableOptions as $option) {
            if (isset($options[$option])) {
                $this->$option = $options[$option];
            }
        }
    }
1290114
protected function setOptions(array $options)
    {
        // change case of the keys
        $defaults = array_change_key_case($this->getDefaultOptions(), CASE_UPPER);
        $options = array_change_key_case($options, CASE_UPPER);
        $options = array_merge($defaults, $options);

        // set base uri if defined
        if(array_key_exists('BASE_URI', $options)) {
            $this->base_uri = $options['BASE_URI'];
        }

        // set the headers
        if(array_key_exists('HEADERS', $options) && is_array($options['HEADERS'])) {
            $this->setHeaders($options['HEADERS']);
        }

        // set proper curl options
        foreach ($options as $key => $value) {
            $cst_name = 'CURLOPT_'.strtoupper(trim($key));
            $cst =  defined($cst_name) ? constant($cst_name) : null;
            if($cst !== null) {
                curl_setopt($this->request, $cst, $value);
            }
        }
    }
87890
public function setOptions(array $options)
    {
        if ($this->server && $this->server->isRunning()) {
            throw new LogicException('Options cannot be set while the server is running.');
        }

        $this->options = array_diff_key($this->options, $options) + $options;

        if ($this->swoolePort != null) {
            $this->swoolePort->set($this->options);
        }
    }
88637
public function set_options(array $options)
	{
		foreach ($options as $key => $val)
		{
			if (is_string($key) && ! is_numeric($key))
			{
				$key = constant('CURLOPT_' . strtoupper($key));
			}

			$this->options[$key] = $val;
		}

		return $this;
	}
118408
static public function setOptions($options = [])
    {
        if (isset($options['gzip'])) {
            self::$optGzip = !empty($options['gzip']);
        }
        if (isset($options['minimal'])) {
            self::$optMinimal = !empty($options['minimal']);
        }
    }
929490
public function setOptions(array $options)
    {
        if (isset($options['bitstring_padding']) && \is_string($options['bitstring_padding'])) {
            $this->options['bitstring_padding'] = $options['bitstring_padding'];
        }

        return $this;
    }
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);
    }
470571
public function options(array $options = [])
    {
        $request = $this->_View->getRequest();

        if (!empty($options['paging'])) {
            $request = $request->withParam(
                'paging',
                $options['paging'] + $request->getParam('paging', [])
            );
            unset($options['paging']);
        }

        $model = $this->defaultModel();
        if (!empty($options[$model])) {
            $request = $request->withParam(
                'paging.' . $model,
                $options[$model] + (array)$request->getParam('paging.' . $model, [])
            );
            unset($options[$model]);
        }

        $this->_View->setRequest($request);

        $this->_config['options'] = array_filter($options + $this->_config['options']);
        if (empty($this->_config['options']['url'])) {
            $this->_config['options']['url'] = [];
        }
        if (!empty($this->_config['options']['model'])) {
            $this->defaultModel($this->_config['options']['model']);
        }
    }
195005
protected function set_options( array $options = [ ] ) {

		foreach ( $options as $key => $value ) {
			if ( ! array_key_exists( $key, $this->options ) ) {
				throw new \InvalidArgumentException(
					sprintf( 'The option "%1$s" does not have a matching option[%1$s] array key', $key ),
					1.0
				);
				continue;
			}

			$this->options[ $key ] = $value;
		}
	}
908431
public function setOptions(array $options)
    {
        foreach ($options as $index=>$val) {
            if (property_exists($this, $index)) {
                $this->{$index} = $val;
            }
        }
        return $this;
    }