$_connect_timeout $_connect_timeout : integer Type integer — connect_timeout The number of seconds to wait while trying to connect. Default is 5 seconds.
$_timeout $_timeout : integer Type integer — timeout The maximum number of seconds to allow cURL call to execute. Default is 30 seconds.
$_fork $_fork : boolean|null Type boolean|null — true to fork the cURL process (using exec) or false to use PHP's cURL extension. false by default
$_num_threads $_num_threads : integer Type integer — number of cURL requests to run in parallel. 1 by default
$_defaults $_defaults : array Default options that can be overridden via the $options constructor arg Type array
__construct() __construct(array $options) Creates a new CurlConsumer and assigns properties from the $options array Parameters array $options Throws \Exception
getNumThreads() getNumThreads() : integer Number of requests/batches that will be processed in parallel using curl_multi_exec. Returns integer
persist() persist(array $batch) : boolean Write to the given host/endpoint using either a forked cURL process or using PHP's cURL extension Parameters array $batch an array of messages to consume Returns boolean
_encode() _encode(array $params) : string Encode an array to be persisted Parameters array $params Returns string
_handleError() _handleError( $code, $msg) Handles errors that occur in a consumer Parameters $code $msg
_debug() _debug() : boolean Returns true if in debug mode, false if in production mode Returns boolean
_execute() _execute( $url, $batch) : boolean Write using the cURL php extension Parameters $url $batch Returns boolean
_execute_forked() _execute_forked( $url, $data) : boolean Write using a forked cURL process Parameters $url $data Returns boolean