Skip to content

Notifications library to send notifications to different chat systems like Stride, Slack, Hipchat and others

Notifications You must be signed in to change notification settings

BenjaminPaap/Notifications

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Send notifications to different configured handlers at once.

Installation

$ composer require bpa/notifications

Usage

Create a room to which your messages should be sent:

class DeveloperRoom implements RoomInterface
{
    public function getIdentifier()
    {
        return 'developer-room';
    }
    
    public function getName()
    {
        return 'Room for developers'; 
    }
} 

Create a message type:

class UrgentDeveloperMessage implements MessageInterface
{
    public function getTitle() 
    {
        return null;
    }
    
    public function getMessage()
    {
        return 'There is an urgent task waiting to be done';
    }
    
    public function getRoom()
    {
        return new DeveloperRoom();
    }
}

Handlers

Currently there is only a single handler. But more are to come. I would love to see some contributions for other chat tools like Slack, Hipchat, IRC or others.

Contribution

About

Notifications library to send notifications to different chat systems like Stride, Slack, Hipchat and others

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages