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

		if (!$config['scheme'] || !$config['host']) {
			return false;
		}
		$url = "{$config['scheme']}://{$config['host']}:{$config['port']}";
		$context = [$config['scheme'] => ['timeout' => $this->_timeout]];

		if (is_object($config['message'])) {
			$url = $config['message']->to('url');
			$context = $config['message']->to('context', ['timeout' => $this->_timeout]);
		}
		$this->_resource = fopen($url, $config['mode'], false, stream_context_create($context));
		return $this->_resource;
	}
public function open(array $options = []) {
		parent::open($options);
		$config = $this->_config;

		if (!$config['scheme'] || !$config['host']) {
			return false;
		}
		$url = "{$config['scheme']}://{$config['host']}:{$config['port']}";
		$context = [$config['scheme'] => ['timeout' => $this->_timeout]];

		if (is_object($config['message'])) {
			$url = $config['message']->to('url');
			$context = $config['message']->to('context', ['timeout' => $this->_timeout]);
		}
		$this->_resource = fopen($url, $config['mode'], false, stream_context_create($context));
		return $this->_resource;
	}
public function open ( array $ options = [ ] ) { parent :: open ( $ options ) ; $ config = $ this -> _config ; if ( ! $ config [ 'scheme' ] || ! $ config [ 'host' ] ) { return false ; } $ url = "{$config['scheme']}://{$config['host']}:{$config['port']}" ; $ context = [ $ config [ 'scheme' ] => [ 'timeout' => $ this -> _timeout ] ] ; if ( is_object ( $ config [ 'message' ] ) ) { $ url = $ config [ 'message' ] -> to ( 'url' ) ; $ context = $ config [ 'message' ] -> to ( 'context' , [ 'timeout' => $ this -> _timeout ] ) ; } $ this -> _resource = fopen ( $ url , $ config [ 'mode' ] , false , stream_context_create ( $ context ) ) ; return $ this -> _resource ; }
Opens the socket and sets its timeout value.

@param array $options Update the config settings.
@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 the socket and sets its timeout value .