PHP Class Habari\CURLRequestProcessor

Inheritance: extends RequestProcessor
Show file Open project: habari/system

Public Methods

Method Description
__construct ( )
_headerfunction ( $ch, $str ) : integer cURL will hand each header received by the *response* to this method, so we use it to conveniently capture them for storing in case the user wants them.
execute ( $method, $url, $headers, $body, $config )
get_response_body ( )
get_response_headers ( )

Method Details

__construct() public method

public __construct ( )

_headerfunction() public method

cURL will hand each header received by the *response* to this method, so we use it to conveniently capture them for storing in case the user wants them.
public _headerfunction ( $ch, $str ) : integer
$ch resource The cURL handle from curl_init() that is executing.
$str string The header received from the response. Should always be a single header at a time.
return integer The length of the header. Used by cURL to report the header_size returned by the curl_getinfo() method.

execute() public method

public execute ( $method, $url, $headers, $body, $config )

get_response_body() public method

public get_response_body ( )

get_response_headers() public method