Наследование: extends Segment_Consumer
Пример #1
0
 /**
  * Creates a new socket consumer for dispatching async requests immediately
  * @param string $secret
  * @param array  $options
  *     number   "timeout" - the timeout for connecting
  *     function "error_handler" - function called back on errors.
  *     boolean  "debug" - whether to use debug output, wait for response.
  */
 public function __construct($secret, $options = array())
 {
     if (!isset($options["timeout"])) {
         $options["timeout"] = 5;
     }
     if (!isset($options["host"])) {
         $options["host"] = "api.segment.io";
     }
     parent::__construct($secret, $options);
 }
Пример #2
0
 /**
  * Creates a new queued fork consumer which queues fork and identify
  * calls before adding them to
  * @param string $secret
  * @param array  $options
  *     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
  */
 public function __construct($secret, $options = array())
 {
     parent::__construct($secret, $options);
 }