protected function _open($url)
    {
        set_error_handler(function ($code, $message) {
            $this->_connectionErrors[] = $message;
        });
        try {
            $this->_stream = fopen($url, 'rb', false, $this->_context);
        } finally {
            restore_error_handler();
        }

        if (!$this->_stream || !empty($this->_connectionErrors)) {
            throw new Exception(implode("\n", $this->_connectionErrors));
        }
    }
protected function _open($url)
    {
        set_error_handler(function ($code, $message) {
            $this->_connectionErrors[] = $message;
        });
        try {
            $this->_stream = fopen($url, 'rb', false, $this->_context);
        } finally {
            restore_error_handler();
        }

        if (!$this->_stream || !empty($this->_connectionErrors)) {
            throw new Exception(implode("\n", $this->_connectionErrors));
        }
    }
protected function _open ( $ url ) { set_error_handler ( function ( $ code , $ message ) { $ this -> _connectionErrors [ ] = $ message ; } ) ; try { $ this -> _stream = fopen ( $ url , 'rb' , false , $ this -> _context ) ; } finally { restore_error_handler ( ) ; } if ( ! $ this -> _stream || ! empty ( $ this -> _connectionErrors ) ) { throw new Exception ( implode ( "\n" , $ this -> _connectionErrors ) ) ; } }
Open the socket and handle any connection errors.

@param string $url The url to connect to.
@return void
@throws \Cake\Core\Exception\Exception
Open the socket and handle any connection errors .