2017 © Pedro Peláez
 

symfony-bundle notificato-symfony

Takes care of push notifications in your Symfony2 & Symfony3 projects.

image

wrep/notificato-symfony

Takes care of push notifications in your Symfony2 & Symfony3 projects.

  • Tuesday, November 14, 2017
  • by wrep
  • Repository
  • 2 Watchers
  • 7 Stars
  • 3,267 Installations
  • PHP
  • 0 Dependents
  • 1 Suggesters
  • 4 Forks
  • 0 Open issues
  • 11 Versions
  • 5 % Grown

The README.md

Notificato for Symfony2 & Symfony3

Notificato takes care of push notifications in your Symfony2 & Symfony3 projects., (*1)

Italian: notificato è: participio passato English: notified, (*2)

What is Notificato?

Notificato makes you send push messages from PHP projects, this repository is a Symfony2 & Symfony3 bundle to easily integrate into Symfony. Want to know more about Notificato? Please check out the Notificate repository for more information., (*3)

Installation

1. Add Composer dependency

Installation with Composer is recommended. Run the require command to add Notificato to your project:, (*4)

composer require wrep/notificato-symfony, (*5)

2. Include the bundle in your Kernel

Add NotificatoBundle to app/AppKernel.php:, (*6)

public function registerBundles()
{
    $bundles = array(
        ...
        new Wrep\Bundle\NotificatoBundle\NotificatoBundle(),
        ...
    );
}

3. Configuration of the default certificate

Add the following configuration options to your app/config.yml:, (*7)

notificato:
    apns:
        certificate:
            pem: /path/to/pem/certificate.pem       # Required if you want to use a default certificate
            passphrase: the-passphrase-of-the-pem   # Required if you want to use a default certificate
            validate: true                          # Optional, default true, set to false if certificate validation fails
            environment: sandbox                    # Optional, autodetect by default, set to production/sandbox if certificate validation fails

The given certificate will be used as default certificate. It's completely optional to set a default certificate, but recommended if you only push to one App., (*8)

Getting started

Once installed you can start using Notificato quite easily from any ContainerAware-environment. Lets say you want to send a pushmessage from a controller:, (*9)

class PushController extends Controller
{
    public function indexAction()
    {
        // First we get a Notificato instance
        $notificato = $this->get('notificato');

        // Now let us get a fresh message from Notificato
        //  This message will be send to device with pushtoken 'fffff...'
        //  it will automaticly be associated with the default certificate
        $message = $notificato->createMessage('ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff');

        // Let's set App icon badge with this push to 1
        $message->setBadge(1);

        // The message is ready, let's send it!
        //  Be aware that this method is blocking and on failure Notificato will retry a few times
        $messageEnvelope = $notificato->send($message);

        // The returned envelope contains usefull information about how many retries where needed and if sending succeeded
        echo $messageEnvelope->getFinalStatusDescription();

        // Of course you should return a nice Response here!
    }
}

Use $this->get('notificato'); to get a Notificato object that is already set up with the default certificate from the config. From there everything is the same as using the normal Notificato library, so check out the docs and API description over there for more tips and tricks., (*10)

Note that there are more services available to get deeper into the Notificare structure, take a look at the services.xml if you're interested., (*11)

Contribute

We'll love contributions, read the Notificato Contribute.md for some more info on what you can do and stuff that you should know if you want to help!, (*12)

Please note that issues and feature requests specific to Notificato for Symfony2 & Symfony3 are tracked in the GitHub issue tracker with this repository. Issues and feature requests for Noticare itself can be submitted at the issue tracker at that repository., (*13)

License & Credits

Notificato for Symfony2 & Symfony3 is released under the MIT License by Rick Pastoor & Mathijs Kadijk, so feel free to use it in commercial and non-commercial projects., (*14)

The Versions

14/11 2017

dev-master

9999999-dev https://github.com/wrep/notificato-symfony

Takes care of push notifications in your Symfony2 & Symfony3 projects.

  Sources   Download

MIT

The Requires

 

by Mathijs Kadijk

symfony2 ios push apns pushnotifications notifications push notifications aps

14/11 2017

1.0.3

1.0.3.0 https://github.com/wrep/notificato-symfony

Takes care of push notifications in your Symfony2 projects.

  Sources   Download

MIT

The Requires

 

by Mathijs Kadijk

symfony2 ios push apns pushnotifications notifications push notifications aps

10/07 2015

1.0.2

1.0.2.0 https://github.com/wrep/notificato-symfony

Takes care of push notifications in your Symfony2 projects.

  Sources   Download

MIT

The Requires

 

by Mathijs Kadijk

symfony2 ios push apns pushnotifications notifications push notifications aps

06/12 2013

dev-feature/retry-fixes

dev-feature/retry-fixes https://github.com/wrep/notificato-symfony

Takes care of push notifications in your Symfony2 projects.

  Sources   Download

MIT

The Requires

 

by Mathijs Kadijk

symfony2 ios push apns pushnotifications notifications push notifications aps

10/04 2013

1.0.1

1.0.1.0 https://github.com/wrep/notificato-symfony

Takes care of push notifications in your Symfony2 projects.

  Sources   Download

MIT

The Requires

 

by Mathijs Kadijk

symfony2 ios push apns pushnotifications notifications push notifications aps

10/04 2013

dev-development

dev-development https://github.com/wrep/notificato-symfony

Takes care of push notifications in your Symfony2 projects.

  Sources   Download

MIT

The Requires

 

by Mathijs Kadijk

symfony2 ios push apns pushnotifications notifications push notifications aps

21/03 2013

1.0.0

1.0.0.0 https://github.com/wrep/notificato-symfony

Takes care of push notifications in your Symfony2 projects.

  Sources   Download

MIT

The Requires

 

by Mathijs Kadijk

symfony2 notification ios push apns

19/03 2013

0.5.0

0.5.0.0 https://github.com/wrep/notificato-symfony

Takes care of push notifications in your Symfony2 projects.

  Sources   Download

MIT

The Requires

 

by Mathijs Kadijk

symfony2 notification ios push apns

11/03 2013

0.2.1

0.2.1.0 https://github.com/wrep/notificare-symfony

An integration bundle for the notificare push notifications module into the Symfony2 framework.

  Sources   Download

MIT

The Requires

 

by Mathijs Kadijk

notification ios push apns

08/03 2013

0.2.0

0.2.0.0 https://github.com/wrep/notificare-symfony

An integration bundle for the notificare push notifications module into the Symfony2 framework.

  Sources   Download

MIT

The Requires

 

by Mathijs Kadijk

notification ios push apns

05/03 2013

0.1.0

0.1.0.0 https://github.com/wrep/notificare-symfony

An integration bundle for the notificare push notifications module into the Symfony2 framework.

  Sources   Download

MIT

The Requires

 

by Mathijs Kadijk

notification ios push apns