PHP Interface DataSift_IStreamConsumerEventHandler

Author: Stuart Dallas ([email protected])
Afficher le fichier Open project: datasift/datasift-php

Méthodes publiques

Méthode Description
onConnect ( DataSift_StreamConsumer $consumer ) : void Called when the stream is connected.
onDeleted ( DataSift_StreamConsumer $consumer, array $interaction, string $hash ) : void Called for each deletion notification consumed.
onDisconnect ( DataSift_StreamConsumer $consumer ) : void Called when the stream is disconnected.
onError ( $consumer, string $message ) : void Called when an error occurs or is received down the stream.
onInteraction ( DataSift_StreamConsumer $consumer, array $interaction, string $hash ) : void Called for each interaction consumed.
onStatus ( DataSift_StreamConsumer $consumer, string $type, array $info ) : void Called for each status message received.
onStopped ( $consumer, string $reason ) : void Called when the consumer stops for some reason.
onWarning ( DataSift_StreamConsumer $consumer, string $message ) : void Called when a warning occurs or is received down the stream.

Method Details

onConnect() public méthode

Called when the stream is connected.
public onConnect ( DataSift_StreamConsumer $consumer ) : void
$consumer DataSift_StreamConsumer The consumer sending the event.
Résultat void

onDeleted() public méthode

Called for each deletion notification consumed.
public onDeleted ( DataSift_StreamConsumer $consumer, array $interaction, string $hash ) : void
$consumer DataSift_StreamConsumer The consumer sending the event.
$interaction array The interaction data.
$hash string The hash of the stream that matched this interaction.
Résultat void

onDisconnect() public méthode

Called when the stream is disconnected.
public onDisconnect ( DataSift_StreamConsumer $consumer ) : void
$consumer DataSift_StreamConsumer The consumer sending the event.
Résultat void

onError() public méthode

Called when an error occurs or is received down the stream.
public onError ( $consumer, string $message ) : void
$message string The error message.
Résultat void

onInteraction() public méthode

Called for each interaction consumed.
public onInteraction ( DataSift_StreamConsumer $consumer, array $interaction, string $hash ) : void
$consumer DataSift_StreamConsumer The consumer sending the event.
$interaction array The interaction data.
$hash string The hash of the stream that matched this interaction.
Résultat void

onStatus() public méthode

Called for each status message received.
public onStatus ( DataSift_StreamConsumer $consumer, string $type, array $info ) : void
$consumer DataSift_StreamConsumer The consumer sending the event.
$type string The status type.
$info array The data sent with the status message.
Résultat void

onStopped() public méthode

Called when the consumer stops for some reason.
public onStopped ( $consumer, string $reason ) : void
$reason string The reason the consumer stopped.
Résultat void

onWarning() public méthode

Called when a warning occurs or is received down the stream.
public onWarning ( DataSift_StreamConsumer $consumer, string $message ) : void
$consumer DataSift_StreamConsumer The consumer sending the event.
$message string The warning message.
Résultat void