public function getTransferInfo($key = null)
    {
        if (empty($this->transferInfo)) {
            throw new CurlWrapperException('There is no transfer info. Did you do the request?');
        }

        if ($key === null) {
            return $this->transferInfo;
        }

        if (isset($this->transferInfo[$key])) {
            return $this->transferInfo[$key];
        }

        throw new CurlWrapperException('There is no such key: '.$key);
    }
public function getTransferInfo($key = null)
    {
        if (empty($this->transferInfo)) {
            throw new CurlWrapperException('There is no transfer info. Did you do the request?');
        }

        if ($key === null) {
            return $this->transferInfo;
        }

        if (isset($this->transferInfo[$key])) {
            return $this->transferInfo[$key];
        }

        throw new CurlWrapperException('There is no such key: '.$key);
    }
public function getTransferInfo ( $ key = null ) { if ( empty ( $ this -> transferInfo ) ) { throw new CurlWrapperException ( 'There is no transfer info. Did you do the request?' ) ; } if ( $ key === null ) { return $ this -> transferInfo ; } if ( isset ( $ this -> transferInfo [ $ key ] ) ) { return $ this -> transferInfo [ $ key ] ; } throw new CurlWrapperException ( 'There is no such key: ' . $ key ) ; }
Gets the information about the last transfer

If $key is given, returns its value. Otherwise, returns an associative array with the following elements:
url                      - Last effective URL
content_type             - Content-Type: of downloaded object, NULL indicates server did not send valid Content-Type: header
http_code                - Last received HTTP code
header_size              - Total size of all headers received
request_size             - Total size of issued requests, currently only for HTTP requests
filetime                 - Remote time of the retrieved document, if -1 is returned the time of the document is unknown
ssl_verify_result        - Result of SSL certification verification requested by setting CURLOPT_SSL_VERIFYPEER
redirect_count           - Number of redirects it went through if CURLOPT_FOLLOWLOCATION was set
total_time               - Total transaction time in seconds for last transfer
namelookup_time          - Time in seconds until name resolving was complete
connect_time             - Time in seconds it took to establish the connection
pretransfer_time         - Time in seconds from start until just before file transfer begins
size_upload              - Total number of bytes uploaded
size_download            - Total number of bytes downloaded
speed_download           - Average download speed
speed_upload             - Average upload speed
download_content_length  - content-length of download, read from Content-Length:  field
upload_content_length    - Specified size of upload
starttransfer_time       - Time in seconds until the first byte is about to be transferred
redirect_time            - Time in seconds of all redirection steps before final transaction was started
certinfo                 - There is official description for this field yet
request_header           - The request string sent. For this to work, add the CURLINFO_HEADER_OUT option

@param string $key @see http://php.net/manual/en/function.curl-getinfo.php
@throws CurlWrapperException
@return array|string
Gets the information about the last transfer