PHP Класс Segment_QueueConsumer

Наследование: extends Segment_Consumer
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$batch_size
$max_queue_size
$queue
$type

Открытые методы

Метод Описание
__construct ( string $secret, array $options = [] ) Store our secret and options as part of this consumer
__destruct ( )
alias ( array $message ) : boolean Aliases from one user id to another
flush ( ) Flushes our queue of messages by batching them to the server
flushBatch ( [type] $batch ) : [type] Flushes a batch of messages.
group ( array $message ) : boolean Tags traits about the group.
identify ( array $message ) : boolean Tags traits about the user.
page ( array $message ) : boolean Tracks a page view.
screen ( array $message ) : boolean Tracks a screen view.
track ( array $message ) : boolean Tracks a user action

Защищенные методы

Метод Описание
enqueue ( mixed $item ) : boolean Adds an item to our queue.
payload ( $batch ) : {Array} Given a batch of messages the method returns a valid payload.

Описание методов

__construct() публичный Метод

Store our secret and options as part of this consumer
public __construct ( string $secret, array $options = [] )
$secret string
$options array

__destruct() публичный Метод

public __destruct ( )

alias() публичный Метод

Aliases from one user id to another
public alias ( array $message ) : boolean
$message array
Результат boolean whether the alias call succeeded

enqueue() защищенный Метод

Adds an item to our queue.
protected enqueue ( mixed $item ) : boolean
$item mixed
Результат boolean whether call has succeeded

flush() публичный Метод

Flushes our queue of messages by batching them to the server
public flush ( )

flushBatch() абстрактный публичный Метод

Flushes a batch of messages.
abstract public flushBatch ( [type] $batch ) : [type]
$batch [type]
Результат [type]

group() публичный Метод

Tags traits about the group.
public group ( array $message ) : boolean
$message array
Результат boolean whether the group call succeeded

identify() публичный Метод

Tags traits about the user.
public identify ( array $message ) : boolean
$message array
Результат boolean whether the identify call succeeded

page() публичный Метод

Tracks a page view.
public page ( array $message ) : boolean
$message array
Результат boolean whether the page call succeeded

payload() защищенный Метод

Given a batch of messages the method returns a valid payload.
protected payload ( $batch ) : {Array}
Результат {Array}

screen() публичный Метод

Tracks a screen view.
public screen ( array $message ) : boolean
$message array
Результат boolean whether the screen call succeeded

track() публичный Метод

Tracks a user action
public track ( array $message ) : boolean
$message array
Результат boolean whether the track call succeeded

Описание свойств

$batch_size защищенное свойство

protected $batch_size

$max_queue_size защищенное свойство

protected $max_queue_size

$queue защищенное свойство

protected $queue

$type защищенное свойство

protected $type