2017 © Pedro Peláez
 

library communicator

A PHP library that helps communicating by broadcasting your messages to one or multiple channels.

image

waltertamboer/communicator

A PHP library that helps communicating by broadcasting your messages to one or multiple channels.

  • Monday, August 7, 2017
  • by waltertamboer
  • Repository
  • 1 Watchers
  • 2 Stars
  • 105 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 5 % Grown

The README.md

Communicator

Latest Version on Packagist ![Software License][ico-license] Build Status ![Coverage Status][ico-scrutinizer] Quality Score ![Total Downloads][ico-downloads], (*1)

Communicator is a PHP library that helps you broadcast messages over multiple channels. This can be useful when you want to send notifcations to users via multiple transports such as e-mail, SMS or IRC., (*2)

Install

Via Composer, (*3)

``` bash $ composer require waltertamboer/communicator, (*4)


## Usage Since communicator doesn't know where to send messages to, you need to implement the `Communicator\Recipient\RecipientInterface` interface. Communicator will use it to determine the target addresses. ``` php $recipient = new ... // An implementation of Communicator\Recipient\RecipientInterface $communicator = new Communicator\Communicator(); // Bind a transport. Of course this can be any transport you require. // It's also possible to bind multiple transports to the same channel. $communicator->bindTransport('my-channel', new Communicator\Transport\Noop\Transport()); // Now broadcast a message to all transports. $communicator->broadcast( [ $recipient, ], 'my-channel', [ 'my-param' => 'some param', ] );

Change log

Please see CHANGELOG for more information on what has changed recently., (*5)

Testing

``` bash $ composer test, (*6)


## Contributing Install the dependencies via Docker: ```bash docker run --rm --interactive --tty \ --volume $PWD:/app \ --volume $SSH_AUTH_SOCK:/ssh-auth.sock \ --volume /etc/passwd:/etc/passwd:ro \ --volume /etc/group:/etc/group:ro \ --user $(id -u):$(id -g) \ --env SSH_AUTH_SOCK=/ssh-auth.sock \ composer install

Run the unit tests:, (*7)

Just make sure the unit tests are present :-), (*8)

Credits

License

The MIT License (MIT). Please see License File for more information., (*9)

The Versions

07/08 2017

dev-master

9999999-dev https://github.com/waltertamboer/communicator

A PHP library that helps communicating by broadcasting your messages to one or multiple channels.

  Sources   Download

MIT

The Requires

  • php ^7.1

 

The Development Requires

email sms messages message communication slack broadcasting irc broadcast communicator communicate