PHP Class Segment_Consumer

Afficher le fichier Open project: segmentio/analytics-php Class Usage Examples

Protected Properties

Свойство Type Description
$options
$secret
$type

Méthodes publiques

Méthode Description
__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

Méthodes protégées

Méthode Description
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.

Method Details

__construct() public méthode

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

alias() abstract public méthode

Aliases from one user id to another
abstract public alias ( array $message ) : boolean
$message array
Résultat boolean whether the alias call succeeded

debug() protected méthode

Check whether debug mode is enabled
protected debug ( ) : boolean
Résultat boolean

group() abstract public méthode

Tags traits about the group.
abstract public group ( array $message ) : boolean
$message array
Résultat boolean whether the group call succeeded

handleError() protected méthode

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() abstract public méthode

Tags traits about the user.
abstract public identify ( array $message ) : boolean
$message array
Résultat boolean whether the identify call succeeded

page() abstract public méthode

Tracks a page view.
abstract public page ( array $message ) : boolean
$message array
Résultat boolean whether the page call succeeded

screen() abstract public méthode

Tracks a screen view.
abstract public screen ( array $message ) : boolean
$message array
Résultat boolean whether the group call succeeded

ssl() protected méthode

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
Résultat boolean

track() abstract public méthode

Tracks a user action
abstract public track ( array $message ) : boolean
$message array
Résultat boolean whether the track call succeeded

Property Details

$options protected_oe property

protected $options

$secret protected_oe property

protected $secret

$type protected_oe property

protected $type