2017 © Pedro Peláez
 

library psr7-push-notification-middleware

PSR7 Middleware for handling push notifications

image

jeremygiberson/psr7-push-notification-middleware

PSR7 Middleware for handling push notifications

  • Tuesday, June 14, 2016
  • by jeremygiberson
  • Repository
  • 1 Watchers
  • 1 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

psr7-push-notification-middleware

PSR7 middleware for handling push notifications. Detects push notifications and triggers a push notification event., (*1)

The middleware checks to see if it recognizes the incoming HTTP request as a push notification. If the request is recognized an appropriate event is dispatched. If the request is not recognized the next middleware is called., (*2)

By default when a push notification request is handled the middleware chain is terminated. That is, even if the request is pointed to a valid route like /do/something/route or even /, that route functionality will not be executed., (*3)

request -> push notification middleware
    if request is recognized push notification 
        -> dispatch notification event 
        -> return 200 response
    else 
        -> return $next_middleware(request, response)

Usage

Ideally, you will add notification event subscribers to the event dispatcher you factory the middleware with. These listeners will do interesting things when a push notification arrives., (*4)

The default, (*5)

Supported Push Notifications

The library provides support for some common services that provide push notifications., (*6)

AWS SNS Notifications

http://docs.aws.amazon.com/sns/latest/dg/SendMessageToHttp.html, (*7)

Github Webhook Notifications

https://developer.github.com/webhooks/#events, (*8)

Gitlab Webhook Notifications

https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/web_hooks/web_hooks.md, (*9)

Slack Webhook Notifications [todo]

https://api.slack.com/outgoing-webhooks, (*10)

Jenkins Notification Plugin [todo]

https://wiki.jenkins-ci.org/display/JENKINS/Notification+Plugin, (*11)

Any Other Notification via Custom Matcher

Write a matcher that implements MatcherInterface and you can support any notification., (*12)

The Versions

14/06 2016

dev-master

9999999-dev

PSR7 Middleware for handling push notifications

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jeremy Giberson