PHP Класс DataSift_Push_Definition

Автор: Stuart Dallas ([email protected])
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$_initial_status An initial status for push subscriptions.
$_output_params The output parameters.
$_output_type The output_type of this push definition.
$_user The user that owns this push definition.

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

Метод Описание
__construct ( DataSift_User $user = false ) Constructor. Takes the user creating the object.
getInitialStatus ( ) : string Get the initial status for subscriptions.
getOutputParam ( string $key ) : string Get an output parameter.
getOutputParams ( ) : array Get all of the output parameters.
getOutputType ( ) : string Get the output type.
setInitialStatus ( string $status ) Set the initial status for subscriptions.
setOutputParam ( string $key, string $val ) Set an output parameter.
setOutputType ( string $type ) Set the output type.
subscribeDefinition ( DataSift_Definition $definition, string $name ) : DataSift_PushSubscription Subscribe this endpoint to a Definition.
subscribeHistoric ( DataSift_Historic $historic, string $name ) : DataSift_PushSubscription Subscribe this endpoint to a Historic.
subscribeHistoricPlaybackId ( string $playback_id, string $name ) : DataSift_PushSubscription Subscribe this endpoint to a historic playback ID.
subscribeStreamHash ( string $hash, string $name ) : DataSift_PushSubscription Subscribe this endpoint to a stream hash.
validate ( ) Validate the output type and parameters with the DataSift API.

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

Метод Описание
subscribe ( string $hash_type, string $hash, string $name ) : DataSift_PushSubscription Subscribe this endpoint to a stream hash or historic playback ID. Note that this will activate the subscription if the initial status is set to active.

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

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

Constructor. Takes the user creating the object.
public __construct ( DataSift_User $user = false )
$user DataSift_User The user creating this object.

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

Get the initial status for subscriptions.
public getInitialStatus ( ) : string
Результат string

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

Get an output parameter.
public getOutputParam ( string $key ) : string
$key string The parameter to get.
Результат string

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

Get all of the output parameters.
public getOutputParams ( ) : array
Результат array

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

Get the output type.
public getOutputType ( ) : string
Результат string

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

Set the initial status for subscriptions.
public setInitialStatus ( string $status )
$status string The initial status.

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

Set an output parameter.
public setOutputParam ( string $key, string $val )
$key string The output parameter to set.
$val string The value to set it to.

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

Set the output type.
public setOutputType ( string $type )
$type string The output type.

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

Subscribe this endpoint to a stream hash or historic playback ID. Note that this will activate the subscription if the initial status is set to active.
protected subscribe ( string $hash_type, string $hash, string $name ) : DataSift_PushSubscription
$hash_type string "hash" or "playback_id"
$hash string The hash or playback ID.
$name string A name for this subscription.
Результат DataSift_PushSubscription The new subscription.

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

Subscribe this endpoint to a Definition.
public subscribeDefinition ( DataSift_Definition $definition, string $name ) : DataSift_PushSubscription
$definition DataSift_Definition The definition to which to subscribe.
$name string A name for this subscription.
Результат DataSift_PushSubscription The new subscription.

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

Subscribe this endpoint to a Historic.
public subscribeHistoric ( DataSift_Historic $historic, string $name ) : DataSift_PushSubscription
$historic DataSift_Historic The historic object to which to subscribe.
$name string A name for this subscription.
Результат DataSift_PushSubscription The new subscription.

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

Subscribe this endpoint to a historic playback ID.
public subscribeHistoricPlaybackId ( string $playback_id, string $name ) : DataSift_PushSubscription
$playback_id string The playback ID.
$name string A name for this subscription.
Результат DataSift_PushSubscription The new subscription.

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

Subscribe this endpoint to a stream hash.
public subscribeStreamHash ( string $hash, string $name ) : DataSift_PushSubscription
$hash string The has to which to subscribe.
$name string A name for this subscription.
Результат DataSift_PushSubscription The new subscription.

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

Validate the output type and parameters with the DataSift API.
public validate ( )

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

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

An initial status for push subscriptions.
protected $_initial_status

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

The output parameters.
protected $_output_params

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

The output_type of this push definition.
protected $_output_type

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

The user that owns this push definition.
protected $_user