harlam/notifications-core

Build and send messages. Core for notifications project

dev-master 2019-06-13 14:10 UTC

README

Build mattermost message:

$message = (new MessageBuilder())
    ->build('mattermost', [
        'username' => 'MyUserName',
        'channel' => '@rcpt',
        'text' => 'message text'
    ]);

Build sender for mattermost message:

$sender = (new MessageSenderBuilder())
    ->build('mattermost', [
        'endpoint' => 'WEBHOOK-URI'
    ]);

Send message:

$sender->send($message);

Supported types: