set up optional behavior.

- 'enable_raw' : enables raw view for markdown files.
- 'before' : sets before filters.
- 'after' : sets after release filters.

@param array $options
344588
public function options(array $options)
    {
        if (array_key_exists('enable_raw', $options)) {
            $this->fileMap->enable_raw = (bool) $options['enable_raw'];
        }
        if (array_key_exists('before', $options)) {
            $this->setBeforeFilter($options['before']);
        }
        if (array_key_exists('after', $options)) {
            $this->setAfterRelease($options['after']);
        }
        if (array_key_exists('roots', $options)) {
            foreach($options['roots'] as $root) {
                $this->setRoot($root);
            }
        }
    }
1335656
public function setOptions($options)
    {
        parent::setOptions($options);
    
        if (isset($options['fetch_url'])) {
            $this->setFetchUrl($options['fetch_url']);
        }
        
        if (isset($options['preview_url'])) {
            $this->setPreviewUrl($options['preview_url']);
        }
        
        return $this;
    }
800904
public function setPostProcessingOptions($options)
    {
        if (isset($options['jpeg_optimize']) && $options['jpeg_optimize']) {
            $this->jpegOptimizeCmd = $options['jpeg_optimize_cmd'];
        } else {
            $this->jpegOptimizeCmd = null;
        }

        if (array_key_exists("png_lossy", $options) 
            && $options['png_lossy'] !== false) {
            $this->pngLossy = $options['png_lossy'];
            $this->pngLossyCmd = $options['png_lossy_cmd'];
        } else {
            $this->pngLossyCmd = null;
        }

        if (isset($options['png_filter']) && $options['png_filter']) {
            $this->pngFilterCmd = $options['png_filter_cmd'];
        } else {
            $this->pngFilterCmd = null;
        }

        if (isset($options['png_deflate']) && $options['png_deflate']) {
            $this->pngDeflateCmd = $options['png_deflate_cmd'];
        } else {
            $this->pngDeflateCmd = null;
        }

        return $this;
    }
983281
protected function setOptions($options)
    {
        if (is_null($this->options)) {
            $this->preloadDefaults(true);
        }
        
        foreach ($options as $k => $v) {
            if (!isset($this->options[$k])) {
                throw new \Exception("Option $k not allowed.");
            }
            $this->options[$k] = $v;
        }
    }
207326
public function setRedirectUrl($options)
    {
        $this->redirectUrl = array(
            404 => !isset($options[404]) ? '' : $options[404],
            405 => !isset($options[405]) ? '' : $options[405]
        );
    }
251837
public function options(array $options, $disabled = false)
    {
        $disabled = (bool)$disabled;
        foreach ($options as $option) {
            if ($option instanceof Option)
                $this->options[] = $option;
            else
                $this->option(
                    $option['value'],
                    $option['label'],
                    isset($option['disabled']) ? $option['disabled'] : $disabled
                );
        }
        return $this;
    }
1042356
protected function setOptions($options = null)
    {
        if (null !== $options) {
            $options = (array) $options;

            if (isset($options['label'])) {
                $this->setLabel($options['label']);
            }
        }

        return $this;
    }
212924
public function setOptions(array $options) : void
    {
        self::$options = array_unique(array_merge(self::$options, $options));
    }
607899
protected function init(array $options = array())
    {
        foreach ($options as $key => $value) {
            if (property_exists($this, $key)) {
                $this->{$key} = $value;
            }
        }
    }
570888
public function setOptions ($options = array())
	{
		// make sure we've got an array for $this->options (could be null)
		if (!is_array($this->options))
		{
			$this->options = array();
		}
		
		// make sure we've gotten a proper argument
		if (!is_array($options))
		{
			throw new InvalidArgumentException ('setOptions requires an array');
		}
		
		// we've yet to init the default options, so create them here
		if (sizeof($this->options) == 0)
		{
			$defaultOptions = array 
			(
				'resizeUp'				=> false,
				'jpegQuality'			=> 100,
				'correctPermissions'	=> false,
				'preserveAlpha'			=> true,
				'alphaMaskColor'		=> array (255, 255, 255),
				'preserveTransparency'	=> true,
				'transparencyMaskColor'	=> array (0, 0, 0)
			);
		}
		// otherwise, let's use what we've got already
		else
		{
			$defaultOptions = $this->options;
		}
		
		$this->options = array_merge($defaultOptions, $options);
	}
124785
public function setOptions(array $options)
    {
        if (isset($options['path']) && is_dir($options['path'])) {
            $this->_path = $options['path'];
        }
        if (isset($options['callback']) && is_callable($options['callback'])) {
            $this->_callback = $options['callback'];
        }
    }
121699
public function setOptions(array $options = array())
    {
        foreach (static::$supportedOptions as $key) {
            if (isset($options[$key])) {
                $this->$key = $options[$key];
            }
        }
    }
300358
public function SetOptions( $options ){
		foreach($options as $option => $value){
			$this->SetOption($option,$value);
		}
	}
196347
public function loadOptions($options)
    {
        if (isset($options['css-files']) && count($options['css-files']) > 0) {
            $this->css = '';
            foreach ($options['css-files'] as $file) {
                $this->css .= file_get_contents($file);
            }
        }
    }
136756
protected function setAttributes($options = array()) {
		if (is_array($options)) {
			foreach ($options as $attribute => $value) {
				$this->setAttribute($attribute, $value);
			}
		}
	}
616677
public function setOptions(array $options): void
    {
        if (headers_sent() || \PHP_SESSION_ACTIVE === session_status()) {
            return;
        }
        $validOptions = array_flip([
            'cache_limiter', 'cache_expire', 'cookie_domain', 'cookie_httponly',
            'cookie_lifetime', 'cookie_path', 'cookie_secure',
            'gc_divisor', 'gc_maxlifetime', 'gc_probability', 'auto_start',
            'lazy_write', 'name', 'referer_check', 'save_path', 'save_handler',
            'serialize_handler', 'use_strict_mode', 'use_cookies',
            'use_only_cookies', 'use_trans_sid', 'upload_progress.enabled',
            'upload_progress.cleanup', 'upload_progress.prefix', 'upload_progress.name',
            'upload_progress.freq', 'upload_progress.min_freq',
            'sid_length', 'sid_bits_per_character', 'trans_sid_hosts', 'trans_sid_tags',
        ]);
        foreach ($options as $key => $value) {
            if (isset($validOptions[$key])) {
                ini_set('session.' . $key, (string) $value);
            }
        }
    }
882399
public function setOptions($options)
    {
        if (is_null($this->callback)) {
            if (is_string($options)) {
                $options = explode(':', $options);
            } else {
                $options = array_values($options);
            }
            if ($this->isPHPFilter) {

                // SPECIFIC PHP FILTER
                if (isset(static::$filters[$this->name])) {
                    $this->callback = $this->name;
                    $this->options = $options;
                } // GENERIC PHP FILTER
                else {
                    $this->callback = 'php';
                    array_unshift($options, $this->name);
                    $this->options = $options;
                }
            } // DEFINED FILTER
            else {
                $this->callback = $this->name;
                $this->options = $options;
            }
        }
    }