public function open(array $options = []) {
		$this->options = [];
		parent::open($options);
		$config = $this->_config;

		if (empty($config['scheme']) || empty($config['host'])) {
			return false;
		}
		if (!empty($config['options'])) {
			$this->set($config['options']);
		}

		$url = "{$config['scheme']}://{$config['host']}";
		$this->_resource = curl_init($url);
		$this->set([
			CURLOPT_PORT => $config['port'],
			CURLOPT_HEADER => true,
			CURLOPT_RETURNTRANSFER => true
		]);

		if (!is_resource($this->_resource)) {
			return false;
		}
		$this->_isConnected = true;
		$this->timeout($config['timeout']);

		if (isset($config['encoding'])) {
			$this->encoding($config['encoding']);
		}
		return $this->_resource;
	}
public function open(array $options = []) {
		$this->options = [];
		parent::open($options);
		$config = $this->_config;

		if (empty($config['scheme']) || empty($config['host'])) {
			return false;
		}
		if (!empty($config['options'])) {
			$this->set($config['options']);
		}

		$url = "{$config['scheme']}://{$config['host']}";
		$this->_resource = curl_init($url);
		$this->set([
			CURLOPT_PORT => $config['port'],
			CURLOPT_HEADER => true,
			CURLOPT_RETURNTRANSFER => true
		]);

		if (!is_resource($this->_resource)) {
			return false;
		}
		$this->_isConnected = true;
		$this->timeout($config['timeout']);

		if (isset($config['encoding'])) {
			$this->encoding($config['encoding']);
		}
		return $this->_resource;
	}
public function open ( array $ options = [ ] ) { $ this -> options = [ ] ; parent :: open ( $ options ) ; $ config = $ this -> _config ; if ( empty ( $ config [ 'scheme' ] ) || empty ( $ config [ 'host' ] ) ) { return false ; } if ( ! empty ( $ config [ 'options' ] ) ) { $ this -> set ( $ config [ 'options' ] ) ; } $ url = "{$config['scheme']}://{$config['host']}" ; $ this -> _resource = curl_init ( $ url ) ; $ this -> set ( [ CURLOPT_PORT => $ config [ 'port' ] , CURLOPT_HEADER => true , CURLOPT_RETURNTRANSFER => true ] ) ; if ( ! is_resource ( $ this -> _resource ) ) { return false ; } $ this -> _isConnected = true ; $ this -> timeout ( $ config [ 'timeout' ] ) ; if ( isset ( $ config [ 'encoding' ] ) ) { $ this -> encoding ( $ config [ 'encoding' ] ) ; } return $ this -> _resource ; }
Opens a curl connection and initializes the internal resource handle.

@param array $options update the config settings
if $options['options'] exists, will be passed to $this->set()
@return mixed Returns `false` if the socket configuration does not contain the
`'scheme'` or `'host'` settings, or if configuration fails, otherwise returns a
resource stream.
Opens a curl connection and initializes the internal resource handle .