PHP Class rcrowe\Hippy\Facade

Show file Open project: rcrowe/hippy Class Usage Examples

Protected Properties

Property Type Description
$client Client
$queue Queue

Public Methods

Method Description
add ( string $msg, boolean $notify = false, string $background = Message::BACKGROUND_YELLOW ) : void Add a plain text message to the queue.
addHtml ( string $msg, boolean $notify = false, string $background = Message::BACKGROUND_YELLOW ) : void Add a html message to the queue.
go ( ) : void Send all messages in the queue.
html ( string $msg, boolean $notify = false, string $background = Message::BACKGROUND_YELLOW ) : void Send a html message.
init ( string $token, string | integer $room, string $from, rcrowe\Hippy\Transport\TransportInterface $transport = null ) Initialise the facade. Must be called first.
text ( string $msg, boolean $notify = false, string $background = Message::BACKGROUND_YELLOW ) : void Send a plain text message.

Method Details

add() public static method

Add a plain text message to the queue.
public static add ( string $msg, boolean $notify = false, string $background = Message::BACKGROUND_YELLOW ) : void
$msg string
$notify boolean
$background string
return void

addHtml() public static method

Add a html message to the queue.
public static addHtml ( string $msg, boolean $notify = false, string $background = Message::BACKGROUND_YELLOW ) : void
$msg string
$notify boolean
$background string
return void

go() public static method

Send all messages in the queue.
public static go ( ) : void
return void

html() public static method

Send a html message.
public static html ( string $msg, boolean $notify = false, string $background = Message::BACKGROUND_YELLOW ) : void
$msg string
$notify boolean
$background string
return void

init() public static method

Initialise the facade. Must be called first.
public static init ( string $token, string | integer $room, string $from, rcrowe\Hippy\Transport\TransportInterface $transport = null )
$token string API token.
$room string | integer Room to send message to.
$from string Who the message is from.
$transport rcrowe\Hippy\Transport\TransportInterface

text() public static method

Send a plain text message.
public static text ( string $msg, boolean $notify = false, string $background = Message::BACKGROUND_YELLOW ) : void
$msg string
$notify boolean
$background string
return void

Property Details

$client protected static property

protected static Client,rcrowe\Hippy $client
return Client

$queue protected static property

protected static Queue,rcrowe\Hippy $queue
return Queue