PHP Class Segment_Consumer_LibCurl

Inheritance: extends Segment_QueueConsumer
Mostra file Open project: segmentio/analytics-php

Protected Properties

Property Type Description
$type

Public Methods

Method Description
__construct ( string $secret, array $options = [] ) Creates a new queued fork consumer which queues fork and identify calls before adding them to
flushBatch ( array $messages ) : boolean Make an async request to our API. Fork a curl process, immediately send to the API. If debug is enabled, we wait for the response.

Method Details

__construct() public method

Creates a new queued fork consumer which queues fork and identify calls before adding them to
public __construct ( string $secret, array $options = [] )
$secret string
$options array boolean "debug" - whether to use debug output, wait for response. number "max_queue_size" - the max size of messages to enqueue number "batch_size" - how many messages to send in a single request

flushBatch() public method

Make an async request to our API. Fork a curl process, immediately send to the API. If debug is enabled, we wait for the response.
public flushBatch ( array $messages ) : boolean
$messages array array of all the messages to send
return boolean whether the request succeeded

Property Details

$type protected_oe property

protected $type