2017 © Pedro Peláez
 

symfony-bundle pushover-bundle

A symfony2 bundle for pushover

image

webdevvie/pushover-bundle

A symfony2 bundle for pushover

  • Wednesday, December 27, 2017
  • by webdevvie
  • Repository
  • 1 Watchers
  • 0 Stars
  • 25 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 4 % Grown

The README.md

PushoverBundle

This is a simple bundle for Symfony2 to send messages through Pushover. This library is still in development and its interface is subject to change., (*1)

Still to do:

  • retrieve receipt status

To install

Add it using composer

composer require "webdevvie/pushover-bundle", (*2)

Add it to your appkernel registerbundles method

new Webdevvie\PushoverBundle\WebdevviePushoverBundle(),, (*3)

Add your token to the config


webdevvie_pushover: token: %pushover_token%

Add your token to the parameters yaml file

    pushover_token: "your_token_here"

To test this


app/console pushover:send <usertoken>

Follow the questions to send a test message, (*4)

In your code

Within your application (in this case a controller) you can send a message to a user's pushover using the following code, (*5)


# get the service from the container; $pushover = $this->get('pushover'); $message = new PushoverMessage(); $message->setUser("usercode_here"); $message->setSound("pushover"); $message->setTitle("A title here"); $message->setMessage("Your message here"); $response = $pushover->sendMessage($message); # Now you can check on the response object with $response->isSent(); # any errors are stored in the $response->getErrors() as an array of strings (isSent will then return false)

If you want to send a message using a higher priority you can set that property on the message object using the constants starting with PRIORITY_, (*6)

Sounds

All the sounds are available via the ->availableSounds() method and as a constant starting with SOUND_ in the PushoverMessage class, (*7)

The Versions

27/12 2017

dev-master

9999999-dev

A symfony2 bundle for pushover

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

symfony2 bundle pushover

27/12 2017

0.3.1

0.3.1.0

A symfony2 bundle for pushover

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

symfony2 bundle pushover

01/06 2016

0.3

0.3.0.0

A symfony2 bundle for pushover

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

symfony2 bundle pushover