PHP Интерфейс rcrowe\Hippy\Transport\TransportInterface

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

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

Метод Описание
__construct ( string $token, string | integer $room, string $from, string $endpoint ) Create a new instance.
getEndpoint ( ) : string Get the API host we will send the message to.
getFrom ( ) : string Get who the message will be sent from.
getHeaders ( ) : array Get the headers that will be sent with the message.
getRoom ( ) : string | integer Get the room the message will be sent to.
getToken ( ) : string Get the token used to authenticate with.
send ( rcrowe\Hippy\Message\MessageInterface $message ) : void Send the message.
setEndpoint ( string $endpoint ) : void Set the API host to send the message to.
setFrom ( string $from ) : void Set who the message will be sent from.
setHeaders ( array $headers ) : void Set the headers that will be sent with the message.
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.

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

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

Create a new instance.
public __construct ( string $token, string | integer $room, string $from, string $endpoint )
$token string API token.
$room string | integer Room to send message to.
$from string Who the message is from.
$endpoint string API host.

getEndpoint() публичный метод

Get the API host we will send the message to.
public getEndpoint ( ) : string
Результат string

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

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

getHeaders() публичный метод

Get the headers that will be sent with the message.
public getHeaders ( ) : array
Результат array

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

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

Send the message.
public send ( rcrowe\Hippy\Message\MessageInterface $message ) : void
$message rcrowe\Hippy\Message\MessageInterface
Результат void

setEndpoint() публичный метод

Set the API host to send the message to.
public setEndpoint ( string $endpoint ) : void
$endpoint string API host.
Результат 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

setHeaders() публичный метод

Set the headers that will be sent with the message.
public setHeaders ( array $headers ) : void
$headers array Key value array
Результат 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