boskee/esendex-bundle

Boskee Esendex Bundle for Symfony

Installs: 17 485

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:symfony-bundle

dev-master / 1.x-dev 2013-10-31 02:41 UTC

This package is not auto-updated.

Last update: 2024-04-22 13:57:43 UTC


README

By boskee

Build Status Latest Stable Version Total Downloads

This bundle enables you to use Esendex SDK as a service in your Symfony project.

For more information see the esendex/sdk repository and the Esendex REST API.

Requirements

Installation

Add in your composer.json

{
    "require": {
        "boskee/esendex-bundle": "dev-master"
    }
}

Install the bundle

$ curl -s http://getcomposer.org/installer | php
$ php composer.phar update boskee/esendex-bundle

Composer will install the bundle to your project's vendor/boskee directory.

Enable the bundle via the kernel

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Boskee\EsendexBundle\BoskeeEsendexBundle(),
    );
}

Configuration

config.yml

boskee_esendex:
    account_reference: "..."
    username: "..."
    password: "..."

Usage

After installation and configuration, the service can be directly referenced from within your controllers.

<?php

$esendex = $this->get('boskee_esendex.dispatcher');

// Create a Text Message
$message = new Boskee\EsendexBundle\Model\TextMessage();
$message->setOriginator('Boskee');
$message->setRecipient('01234567890');
$message->setBody('Test message');

$response = $esendex->send($message->prepare());

License

This bundle is under the MIT license. For the full copyright and license information, please view the LICENSE file that was distributed with this source code.