PHP Класс Segment

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

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

Метод Описание
alias ( array $message ) : boolean Aliases the user id from a temporary id to a permanent one
flush ( ) Flush the client
group ( array $message ) : boolean Tags traits about the group.
identify ( array $message ) : boolean Tags traits about the user.
init ( string $secret, array $options = [] ) Initializes the default client to use. Uses the socket consumer by default.
page ( array $message ) : boolean Tracks a page view
screen ( array $message ) : boolean Tracks a screen view
track ( array $message ) : boolean Tracks a user action
validate ( array $msg, string $type ) Validate common properties.

Приватные методы

Метод Описание
assert ( array $value, string $msg ) Assert value or throw.
checkClient ( ) Check the client.

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

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

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

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

Flush the client
public static flush ( )

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

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

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

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

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

Initializes the default client to use. Uses the socket consumer by default.
public static init ( string $secret, array $options = [] )
$secret string your project's secret key
$options array passed straight to the client

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

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

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

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

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

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

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

Validate common properties.
public static validate ( array $msg, string $type )
$msg array
$type string