Inits the cURL

@param array $options
@return void
501087
public function init(array $options = array())
    {
        $this->ch = curl_init();

        if (!empty($options)) {
            $this->setOptions($options);
        }
    }
1255311
private function init()
    {
        $this->curl = curl_init();
        $this->setUserAgent(self::USER_AGENT);
        $this->setOpt(CURLINFO_HEADER_OUT, true);
        $this->setOpt(CURLOPT_HEADER, false);
        $this->setOpt(CURLOPT_RETURNTRANSFER, true);
        $this->setOpt(CURLOPT_HEADERFUNCTION, array($this, 'addResponseHeaderLine'));
        return $this;
    }
538863
public function initialize(array $options)
    {
        foreach ($options as $optionName => $optionValue) {
            $methodName = 'set' . ucfirst($optionName);
            if (method_exists($this, $methodName)) {
                $this->$methodName($optionValue);
            }
        }
    }
1043032
protected function curlSetOptions($curl, $options)
    {
        foreach ($options as $k => $v) {
            // $this->debug->log($k, $v);
            if (\is_string($k) && \defined($k)) {
                $k = \constant($k);
            }
            if (\is_string($v) && \defined($v)) {
                $v = \constant($v);
            }
            if (\is_null($v) || \is_string($v) && empty($v)) {
                unset($options[$k]);
            } elseif (\is_int($k)) {
                \curl_setopt($curl, $k, $v);
            }
        }
        if ($this->debug->getCfg('collect')) {
            $optionsDebug = array();
            foreach ($options as $k => $v) {
                if (\strpos($k, 'PWD')) {
                    $v = \preg_replace('/:.*$/', ':xxxxxx', $v);
                }
                $optionsDebug[$k] = array('value' => $v);
            }
            $this->debug->table('options', $optionsDebug);
        }
    }
384561
public function init($component, $options = array()) {
		if (isset($component)) {
			$this->setComponent($component);
		}

		$this->setRedirectUrl(Yii::app()->user->returnUrl);
		$server = Yii::app()->request->getHostInfo();
		$path = Yii::app()->request->getPathInfo();
		$this->setCancelUrl($server . '/' . $path);

		foreach ($options as $key => $val) {
			$this->$key = $val;
		}
	}
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;
	}
879874
public function setOptions(array $options)
    {
        foreach ($options as $option => $value) {
            $methodName = 'set'.ucfirst($option);
            if (method_exists($this, $methodName)) {
                $this->$methodName($value);
            }
        }
    }
1167543
protected function initialize($options)
    {
        if (is_array($options) === false && ($options instanceof Traversable) === false) {
            throw new Exception('The $options argument must be either an array or Traversable');
        }

        foreach ($options as $key => $value) {
            if (in_array($key, $this->configurable, true) === false) {
                continue;
            }

            $method = 'set'.ucfirst($key);

            if (method_exists($this, $method) === true) {
                $this->$method($value);
            }
        }
    }
648135
private function initialize($params = array())
	{
		if (count($params) > 0)
		{
			foreach ($params as $key => $value)
			{
				if (isset($this->{$key}))
				{
					$this->{$key} = $value;
				}
				else if (strpos($key, 'CURLOPT_') === 0) 
				{
					curl_setopt($this->ch, $key, $value);    
				}
			}
		}
	}
1133717
protected function setOptions($options)
    {
        if (!$options instanceof OptionsInterface) {
            $options = is_array($options) ? $options : [];
            $options = new Options($options);
        }

        $this->options = $options;
    }
985003
protected function initOptions()
    {
        if (!empty($this->requestParams)) {
            if (isset($this->options[CURLOPT_HTTPGET])) {
                $this->prepareGetParams();
            } else {
                $this->addOption(CURLOPT_POSTFIELDS, http_build_query($this->requestParams));
            }
        }

        if (!empty($this->headers)) {
            $this->addOption(CURLOPT_HTTPHEADER, $this->prepareHeaders());
        }

        if (!empty($this->cookieFile)) {
            $this->addOption(CURLOPT_COOKIEFILE, $this->cookieFile);
            $this->addOption(CURLOPT_COOKIEJAR, $this->cookieFile);
        }

        if (!empty($this->cookies)) {
            $this->addOption(CURLOPT_COOKIE, $this->prepareCookies());
        }

        if (!curl_setopt_array($this->ch, $this->options)) {
            throw new CurlWrapperCurlException($this->ch);
        }
    }
33623
public function curlOpts( array $options )
      : Request
   {

      $this->_curlOpts = \array_merge( $this->_curlOpts, $options );

      return $this;

   }
891999
protected function _initialize($options = array()) {
		if ($this->_initialized) {
			return;
		}

		$this->_initialized = true;
		if (!empty($options['_css'])) {
			foreach ((array)$options['_css'] as $css) {
				$this->Html->css($css, null, array('inline' => false));
			}
		}

		if (!empty($options['_cssText'])) {
			$out = $this->Html->tag('style', $options['_cssText']);
			$this->_View->append('css', $out);
		}

		if (!empty($options['_scriptBlock'])) {
			$scriptOpts = array('block' => $options['_scriptBlock']);
		} else {
			$scriptOpts = false;
		}

		if (!empty($options['_scripts'])) {
			foreach ((array)$options['_scripts'] as $script) {
				$this->Html->script($script, $scriptOpts);
			}
		}
	}
244252
public function init(array $options = [])
    {
        if ($this->wasInitialized) {
            return;
        }

        $this->options = $this->normalizeOptions($options);
        define('AOP_ROOT_DIR', $this->options['appDir']);
        define('AOP_CACHE_DIR', $this->options['cacheDir']);

        /** @var $container AspectContainer */
        $container = $this->container = new $this->options['containerClass'];
        $container->set('kernel', $this);
        $container->set('kernel.interceptFunctions', $this->hasFeature(Features::INTERCEPT_FUNCTIONS));
        $container->set('kernel.options', $this->options);

        SourceTransformingLoader::register();

        foreach ($this->registerTransformers() as $sourceTransformer) {
            SourceTransformingLoader::addTransformer($sourceTransformer);
        }

        // Register kernel resources in the container for debug mode
        if ($this->options['debug']) {
            $this->addKernelResourcesToContainer($container);
        }

        AopComposerLoader::init($this->options, $container);

        // Register all AOP configuration in the container
        $this->configureAop($container);

        $this->wasInitialized = true;
    }
6784
public function config(array $options)
    {
        $this->options = $options;
    
        $this->initializeOptions($options);
    
        if ($this->getSession()->debug == true) {
            $this->setDebug(true);
        }
    }
524380
protected function setConnectionOptions(Array $options)
    {
        if (!is_resource($this->connection)) {
            throw new ConnectionErrorException('cURL connection has not been set up yet!');
        }
        if (!curl_setopt_array($this->connection, $options)) {
            throw new ConnectionErrorException('Unable to set cURL options' . PHP_EOL . curl_error($this->connection));
        }
        return $this;
    }
1006361
public function initMailer($options) {
		$this->options = $options;
		
		if (isset($this->options['format'])) {
			$this->formatoptions = $this->options['format'];
			unset($this->options['format']);
		}
		
		if (isset($this->options['logger'])) {
			$this->setLogger($this->options['logger']);
			
			if (!isset($this->formatoptions['logger'])) {
				$this->formatoptions['logger'] = $this->options['logger'];
			}
			
			unset($this->options['logger']);
		}
		
		
	}