Setup the elFinder connector.

@param  array|null $extraOptions Additional settings to pass to elFinder.
@return elFinderConnector
973661
public function setupElfinder(array $extraOptions = [])
    {
        if (!defined('ELFINDER_IMG_PARENT_URL')) {
            // Ensure images injected by elFinder are relative to its assets directory
            define('ELFINDER_IMG_PARENT_URL', $this->baseUrl(ElfinderTemplate::ELFINDER_ASSETS_REL_PATH));
        }

        $options = $this->buildConnectorOptions($extraOptions);

        // Run elFinder
        $connector = new elFinderConnector(new elFinder($options));
        $connector->run();

        return $connector;
    }
914597
public function addOption(OptionInterface $option)
    {
        if (!$this->hasOption($option)) {
            $this->options->add($option);
        }

        return $this;
    }
278877
public function connector(){
        $this->autoRender = false;
    
        $options = Configure::read('TinymceElfinder.options');

        $connector = new \elFinderConnector(new \elFinder($options));
        $connector->run();
    }
773713
private function getConnectionOptionsDsn(array $connectionOptions) : string
    {
        $connectionOptionsDsn = '';

        foreach ($connectionOptions as $paramName => $paramValue) {
            $connectionOptionsDsn .= sprintf(';%s=%s', $paramName, $paramValue);
        }

        return $connectionOptionsDsn;
    }
1151094
public function setOptions(array $options)
    {
        if (isset($options['exchange'])) {
            $this->exchange = $options['exchange'];
        }
        if (isset($options['exchange'])) {
            if (!is_string($options['exchange'])) {
                throw new \UnexpectedValueException('exchange value is not a string, a string is required');
            }
            $this->exchange = $options['exchange'];
            unset($options['exchange']);
        }
        if (isset($options['queue'])) {
            if (isset($options['queue']['arguments'])) {
                $this->queueOptions = $options['queue'];
            }
            unset($options['queue']);
        }
        /*
         * @deprecated use of $options['uri'] is deprecated in favor of $options['connection']
         * this block is meant to provide reverse comparability 
         */
        if (!isset($options['connection']) && isset($options['uri'])) {
            trigger_error(
                'the use of `uri` in config options is no longer support for Rhubarb version >= 3.1',
                E_USER_DEPRECATED
            );
            $options['connection'] = $options['uri'];
            unset($options['connection']);
        } elseif (isset($options['uri'])) {
            trigger_error('as of Rhubarb version >= 3.1 `uri` config options is unsupported, you must not implement ' .
                '`connection` and `uri` together', E_NOTICE);
            unset($options['connection']);
        }
        if (isset($options['connection'])) {
            $uri = parse_url($options['connection']);
            if (!isset($uri['port'])) {
                $uri['scheme'] == 'amqps' ? 5673 : $this->options['connection']['port'];
            } else {
                $port = isset($uri['port']) ? $uri['port'] : $this->options['connection']['port'];
            }
            unset($options['connection']);
            $options['connection']['host'] = $uri['host'];
            $options['connection']['port'] = $port;
            $options['connection']['vhost'] = isset($uri['path']) ? $uri['path'] : $this->options['connection']['path'];
            /* I don't like it but to ensure that all parties are happy this is necasary */
            $options['connection']['vhost'] = preg_replace('#^/#', null, $options['connection']['vhost']);
            $options['connection']['login'] = isset($uri['username']) ? $uri['username'] : $this->options['connection']['login'];
            $options['connection']['password'] = isset($uri['pass']) ? $uri['pass'] : $this->options['connection']['password'];
            $this->options['connection'] = $options['connection'];
        }
        return $this;
    }
90904
public function createService(string $key, ServiceLocatorInterface $serviceLocator, array $extra = null): object
    {
        $config = $serviceLocator->getConfig();
        $config = $config[RouterInterface::class] ?? [];

        $router = new Router();
        foreach ($config['routes'] ?? [] as $name => $config) {
            $router->addRoute(
                $this->createRoute($serviceLocator, $config),
                $name
            );
        }

        return $router;
    }
631585
public function setAdditionalImages(array $additionalImages)
    {
        $resolver = new OptionsResolver();
        $this->configureAdditionalImage($resolver);
        $this->additionalImages = $additionalImages;
        foreach ($additionalImages as $additionalImage) {
            $this->addAdditionalImage($additionalImage, $resolver);
        }

        return $this;
    }
237289
public function setOption(int $option, bool $enable = true): OptionsInterface
    {
        if ($enable && ! $this->hasOption($option)) {
            $this->withOptions($option);
        }

        if (! $enable && $this->hasOption($option)) {
            $this->withoutOptions($option);
        }

        return $this;
    }
478619
protected function createOption($projections, $sort, $otherOptions = [])
    {
        $options = [];
        isset($projections) ? $options["projection"] = $this->castQuery($projections) : null;
        isset($sort) ? $options["sort"] = $this->castQuery($sort) : null;

        $options = array_merge($this->documentManager->getDefaultOptions(), $otherOptions, $options);
        return $options;
    }
881697
public function import($filePath, $extraProperties = [], $options = [])
    {
        $extraProperties[UserRdf::PROPERTY_ROLES] = ProctorService::ROLE_PROCTOR;
        $extraProperties['roles'] = ProctorService::ROLE_PROCTOR;
        return parent::import($filePath, $extraProperties, $options);
    }
209517
public function addOptions(array $options) : Getopt
    {
        if (!empty($this->options)){
            $this->options = array_merge($this->options, $options);
        }
        else{
            $this->options = $options;
        }
        return $this;
    }
906429
public function extraVars($extraVars = ''): AnsiblePlaybookInterface
    {
        $extraVars = $this->checkParam($extraVars, ' ');
        $this->addOption('--extra-vars', $extraVars);

        return $this;
    }
237222
protected function prepareCurlOptions ( $curl_options, $extra_headers )
	{
		$hs = array();
		if (!empty($curl_options[CURLOPT_HTTPHEADER]) && is_array($curl_options[CURLOPT_HTTPHEADER]))
		{
			foreach ($curl_options[CURLOPT_HTTPHEADER] as $h)
			{
				list($opt, $val) = explode(':', $h, 2);
				$opt      = str_replace(' ', '-', ucwords(str_replace('-', ' ', $opt)));
				$hs[$opt] = $val;
			}
		}

		$curl_options[CURLOPT_HTTPHEADER] = array();
		$hs = array_merge($hs, $extra_headers);
		foreach ($hs as $h => $v)
		{
			$curl_options[CURLOPT_HTTPHEADER][] = "$h: $v";
		}
		return $curl_options;
	}
319205
public function addExtra($extra, $value)
    {
        if (isset($this->extra->$extra) && is_array($this->extra->$extra)) {
            array_merge($this->extra->$extra, $value);
        } else {
            $this->extra->$extra = $value;
        }

        return $this;
    }
1320651
public function setOptions($options)
    {
        if (array_key_exists('allowipv6', $options)) {
            $this->_options['allowipv6'] = (boolean) $options['allowipv6'];
        }

        if (array_key_exists('allowipv4', $options)) {
            $this->_options['allowipv4'] = (boolean) $options['allowipv4'];
        }

        if (!$this->_options['allowipv4'] && !$this->_options['allowipv6']) {
            require_once 'Zend/Validate/Exception.php';
            throw new Zend_Validate_Exception('Nothing to validate. Check your options');
        }

        return $this;
    }
960001
public function setOptions(array $options): FieldTypeInterface
    {
        $this->validateOptions($options);
        $this->options = $this->parseOptions(array_merge(
            $this->getDefaultOptions(),
            $this->options,
            $options
        ));

        return $this;
    }
1201749
public function setOptions(array $options): FieldTypeInterface
    {
        $l10n = $this->handleLocalization($options);

        $options = array_merge(
            $this->getDefaultOptions(),
            $this->options,
            $options
        );

        if (isset($options['l10n']) && ! empty($l10n)) {
            $options['l10n'] = array_merge($options['l10n'], $l10n);
        }

        $this->options = $this->parseOptions($options);

        return $this;
    }