PHP Класс Segment_Consumer

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

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

Свойство Тип Описание
$options
$secret
$type

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

Метод Описание
__construct ( string $secret, array $options = [] ) Store our secret and options as part of this consumer
alias ( array $message ) : boolean Aliases from one user id to another
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

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

Метод Описание
debug ( ) : boolean Check whether debug mode is enabled
handleError ( string $code, string $msg ) On an error, try and call the error handler, if debugging output to error_log as well.
ssl ( ) : boolean Check whether we should connect to the API using SSL. This is enabled by default with connections which make batching requests. For connections which can save on round-trip times, you may disable it.

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

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

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

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

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

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

Check whether debug mode is enabled
protected debug ( ) : boolean
Результат boolean

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

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

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

On an error, try and call the error handler, if debugging output to error_log as well.
protected handleError ( string $code, string $msg )
$code string
$msg string

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

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

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

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

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

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

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

Check whether we should connect to the API using SSL. This is enabled by default with connections which make batching requests. For connections which can save on round-trip times, you may disable it.
protected ssl ( ) : boolean
Результат boolean

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

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

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

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

protected $options

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

protected $secret

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

protected $type