/** * Creates a new AbstractConsumer * @param array $options */ function __construct($options = array()) { parent::__construct($options); if ($this->_debug()) { $this->_log("Instantiated new Consumer"); } }
/** * Creates a new MixpanelBaseProducer, assings Mixpanel project token, registers custom Consumers, and instantiates * the desired consumer * @param $token * @param array $options */ public function __construct($token, $options = array()) { parent::__construct($options); // register any customer consumers if (array_key_exists("consumers", $options)) { $this->_consumers = array_merge($this->_consumers, $options['consumers']); } // set max queue size if (array_key_exists("max_queue_size", $options)) { $this->_max_queue_size = $options['max_queue_size']; } // associate token $this->_token = $token; if ($this->_debug()) { $this->_log("Using token: " . $this->_token); } // instantiate the chosen consumer $this->_consumer = $this->_getConsumer(); }
/** * Instantiates a new Mixpanel instance. * @param $token * @param array $options */ public function __construct($token, $options = array()) { parent::__construct($options); $this->people = new Producers_MixpanelPeople($token, $options); $this->_events = new Producers_MixpanelEvents($token, $options); }