2017 © Pedro Peláez
 

symfony-bundle twilio-bundle

A simple Symfony 2, 3 bundle for the official sdk provided by Twilio.

image

vresh/twilio-bundle

A simple Symfony 2, 3 bundle for the official sdk provided by Twilio.

  • Wednesday, August 17, 2016
  • by fridolin-koch
  • Repository
  • 4 Watchers
  • 45 Stars
  • 275,857 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 34 Forks
  • 4 Open issues
  • 11 Versions
  • 6 % Grown

The README.md

Symfony2 Twilio Bundle - by Fridolin Koch

Build Status, (*1)

Coverage Status, (*2)

Scrutinizer Code Quality, (*3)

About

This is just a wrapper for the official SDK provided by Twilio., (*4)

Installation

Add this to your composer.json file:, (*5)

"require": {
    "vresh/twilio-bundle": "dev-master",
}

Add the bundle to app/AppKernel.php, (*6)

$bundles = array(
    // ... other bundles
    new Vresh\TwilioBundle\VreshTwilioBundle(),
);

Configuration

Add this to your config.yml:, (*7)

vresh_twilio:
    #(Required) Your Account SID from www.twilio.com/user/account
    sid: 'XXXXXXXX'
    #(Required) Your Auth Token from www.twilio.com/user/account
    authToken: 'YYYYYYYY'
    #(Optional, default: '2010-04-01') Twilio API version
    version: '2010-04-01'
    #(Optional, default: 1) Number of times to retry failed requests
    retryAttempts: 3

Usage

Provided services:, (*8)

Service Class
twilio.api \Services_Twilio
twilio.capability \Services_Twilio_Capability
twilio.lookups \Lookups_Services_Twilio

Inside a controller:, (*9)

class TelephoneController extends Controller
{
    public function callAction($me, $maybee)
    {
        //returns an instance of Vresh\TwilioBundle\Service\TwilioWrapper
        $twilio = $this->get('twilio.api');

        $message = $twilio->account->messages->sendMessage(
      '+14085551234', // From a Twilio number in your account
      '+12125551234', // Text any number
      "Hello monkey!"
    );

        //get an instance of \Service_Twilio
        $otherInstance = $twilio->createInstance('BBBB', 'CCCCC');

        return new Response($message->sid);
    }
}

Inside a console command:, (*10)

class SomeCommand extends ContainerAwareCommand
{
    protected function configure()
    {
        $this
            ->setName('some:comand')
            ->setDescription('A command')
        ;
    }

    protected function execute(InputInterface $input, OutputInterface $output)
    {
        //returns an instance of Vresh\TwilioBundle\Service\TwilioWrapper
        $twilio = $this->getContainer()->get('twilio.api');

        $message = $twilio->account->messages->sendMessage(
      '+14085551234', // From a Twilio number in your account
      '+12125551234', // Text any number
      "Hello monkey!"
    );

        //get an instance of \Service_Twilio
        $otherInstance = $twilio->createInstance('BBBB', 'CCCCC');

        print $message->sid;

    }
}

See LICENSE, (*11)

The Versions

17/08 2016

dev-master

9999999-dev https://github.com/fridolin-koch/VreshTwilioBundle

A simple Symfony 2, 3 bundle for the official sdk provided by Twilio.

  Sources   Download

MIT

The Requires

 

The Development Requires

twilio

17/08 2016

1.0.2

1.0.2.0 https://github.com/fridolin-koch/VreshTwilioBundle

A simple Symfony 2, 3 bundle for the official sdk provided by Twilio.

  Sources   Download

MIT

The Requires

 

The Development Requires

twilio

14/06 2016

1.0.1

1.0.1.0 https://github.com/fridolin-koch/VreshTwilioBundle

A simple Symfony 2, 3 bundle for the official sdk provided by Twilio.

  Sources   Download

MIT

The Requires

 

The Development Requires

twilio

06/02 2016

v1.0.0

1.0.0.0 https://github.com/fridolin-koch/VreshTwilioBundle

A simple Symfony 2, 3 bundle for the official sdk provided by Twilio.

  Sources   Download

MIT

The Requires

 

The Development Requires

twilio

02/11 2015

0.5.0

0.5.0.0 https://github.com/fridolin-koch/VreshTwilioBundle

A simple Symfony2 bundle for the official sdk provided by Twilio.

  Sources   Download

MIT

The Requires

 

The Development Requires

twilio

16/07 2014

0.4.3

0.4.3.0 https://github.com/fridolin-koch/VreshTwilioBundle

A simple Symfony2 bundle for the official sdk provided by Twilio.

  Sources   Download

MIT

The Requires

 

The Development Requires

twilio

25/04 2014

v0.4.2

0.4.2.0 https://github.com/fridolin-koch/VreshTwilioBundle

A simple Symfony2 bundle for the official sdk provided by Twilio.

  Sources   Download

MIT

The Requires

 

twilio

21/04 2013

v0.4.1

0.4.1.0 https://github.com/fridolin-koch/VreshTwilioBundle

A simple Symfony2 bundle for the official sdk provided by Twilio.

  Sources   Download

MIT

The Requires

 

twilio

20/04 2013

v0.4

0.4.0.0 https://github.com/fridolin-koch/VreshTwilioBundle

A simple Symfony2 bundle for the official sdk provided by Twilio.

  Sources   Download

MIT

The Requires

 

twilio

04/04 2013

v0.3

0.3.0.0 https://github.com/fridolin-koch/VreshTwilioBundle

A simple Symfony2 bundle for the official sdk provided by Twilio.

  Sources   Download

MIT

The Requires

 

twilio

20/10 2012

v0.2

0.2.0.0 https://github.com/fridolin-koch/VreshTwilioBundle

Symfony TwilioBundle

  Sources   Download

MIT

The Requires

 

twilio