2017 © Pedro Peláez
 

symfony-bundle notifier-bundle

Notifier integration for Symfony

image

notifier/notifier-bundle

Notifier integration for Symfony

  • Tuesday, November 11, 2014
  • by NoUseFreak
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Symfony-Bundle

Build Status Latest Stable Version Latest Unstable Version Total Downloads Dependency Status License, (*1)

Notifier integration for symfony projects., (*2)

Installation

Installing this bundle can be done through these simple steps:, (*3)

  1. Add the bundle to your project as a composer dependency:, (*4)

    // composer.json
    {
      // ...
      require: {
          // ...
          "notifier/notifier-bundle": "~1.0"
      }
    }
    
  2. Update your composer installation: ```shell composer update ````, (*5)

  3. Add the bundle to your application kernel:, (*6)

    // app/AppKernel.php
    public function registerBundles()
    {
      // ...
      $bundle = array(
          // ...
          new Notifier\NotifierBundle\NotifierNotifierBundle(),
      );
      // ...
    
      return $bundles;
    }
    

Usage

Implement the data provider, (*7)

Implement \Notifier\NotifierBundle\Notifier\RecipientChannelResolverInterface and register it as a service. Than register that service identifier as the recipient_channel_resolver., (*8)

Configure the types, (*9)

config.yml, (*10)

notifier:
   recipient_channel_resolver: "acme.recipient_channel_resolver"
   types:
       alert:
           channels: [ "acme.mail_channel" ]

Make sure the channels all resolve to an existing service defined in the project., (*11)

Send a message, (*12)

use Notifier\Message\Message;
use Notifier\Recipient\Recipient;
use Notifier\NotifierBundle\Type\Type;

// ...

$message = new Message(new Type('alert'));
$this->get('notifier')->sendMessage($message, array(new Recipient('identifier')));

Contributing

All code contributions - including those of people having commit access - must go through a pull request and approved by a core developer before being merged. This is to ensure proper review of all the code., (*13)

Fork the project, create a feature branch, and send us a pull request., (*14)

To ensure a consistent code base, you should make sure the code follows the Coding Standards which we borrowed from Symfony. Make sure to check out php-cs-fixer as this will help you a lot., (*15)

If you would like to help, take a look at the list of issues., (*16)

Requirements

PHP 5.3.2 or above, (*17)

Author and contributors

Dries De Peuter - dries@nousefreak.be - http://nousefreak.be, (*18)

See also the list of contributors who participated in this project., (*19)

License

NotifierBundle is licensed under the MIT license., (*20)

The Versions

11/11 2014

dev-master

9999999-dev

Notifier integration for Symfony

  Sources   Download

MIT

The Requires