PHP Класс rcrowe\Hippy\Client

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

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

Свойство Тип Описание
$from Name the message will be sent from.
$room Name or id of the room.
$token Admin or notification token.
$transport rcrowe\Hippy\Transport\TransportInterface

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

Метод Описание
__construct ( rcrowe\Hippy\Transport\TransportInterface $transport ) Create a new instance on the client
getFrom ( ) : string Get who the message will be sent from.
getRoom ( ) : string | integer Get the room the message will be sent to.
getToken ( ) : string Get the token used to authenticate with.
getTransport ( ) : rcrowe\Hippy\Transport\TransportInterface Return the TransportInterface that will actually send the message.
send ( rcrowe\Hippy\Message\SenderInterface $msg ) : void Send a single message or a queue of messages. A queue must implement \Iterator in order to work.
setFrom ( string $from ) : void Set who the message will be sent from.
setRoom ( string $room ) : void Set the room that the message will be sent to.
setToken ( string $token ) : void Set the token used to authenticate with.
setTransport ( rcrowe\Hippy\Transport\TransportInterface $transport ) : void Set the instance of TransportInterface that will actually send the message.

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

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

Create a new instance on the client
public __construct ( rcrowe\Hippy\Transport\TransportInterface $transport )
$transport rcrowe\Hippy\Transport\TransportInterface

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

Get who the message will be sent from.
public getFrom ( ) : string
Результат string

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

Get the room the message will be sent to.
public getRoom ( ) : string | integer
Результат string | integer

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

Get the token used to authenticate with.
public getToken ( ) : string
Результат string

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

Return the TransportInterface that will actually send the message.
public getTransport ( ) : rcrowe\Hippy\Transport\TransportInterface
Результат rcrowe\Hippy\Transport\TransportInterface

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

Send a single message or a queue of messages. A queue must implement \Iterator in order to work.
public send ( rcrowe\Hippy\Message\SenderInterface $msg ) : void
$msg rcrowe\Hippy\Message\SenderInterface
Результат void

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

Set who the message will be sent from.
public setFrom ( string $from ) : void
$from string Message will be sent by this user.
Результат void

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

Set the room that the message will be sent to.
public setRoom ( string $room ) : void
$room string Room name or id.
Результат void

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

Set the token used to authenticate with.
public setToken ( string $token ) : void
$token string API token. See https://{domain}.hipchat.com/admin/api.
Результат void

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

Set the instance of TransportInterface that will actually send the message.
public setTransport ( rcrowe\Hippy\Transport\TransportInterface $transport ) : void
$transport rcrowe\Hippy\Transport\TransportInterface
Результат void

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

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

Name the message will be sent from.
protected $from

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

Name or id of the room.
protected $room

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

Admin or notification token.
protected $token

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

protected TransportInterface,rcrowe\Hippy\Transport $transport
Результат rcrowe\Hippy\Transport\TransportInterface