botjaeger/nexmo-bundle

Integrates nexmo-php in symfony 3 & 4

Installs: 582

Dependents: 0

Suggesters: 0

Stars: 2

Watchers: 0

Forks: 0

Open Issues: 0

Type:symfony-bundle

0.5 2019-07-21 05:23 UTC

README

Symfony integration of the nexmo/nexmo-php client

Getting Started

Installing

Just require the bundle with composer

composer require botjaeger/nexmo-bundle

Then add the following line to your app/AppKernel.php

public function registerBundles()
{
    return [
        ...
        new Botjaeger\NexmoBundle\BotjaegerNexmoBundle(),
    ];
}

Configuration

Add the following lines to your config.yml

botjaeger_nexmo:
    api_key: 'nexmo_api_key'
    api_secret: 'nexmo_api_secret'

Usage

Then call 'botjaeger_nexmo.nexmo_client.client' in the container (some simplified methods)

$api = $this->get('botjaeger_nexmo.nexmo_client.client');
...

Or use the default nexmo client

$api = $this->get('default_nexmo.client');
...

Test

Must have docker installed in your system

./test