2017 © Pedro Peláez
 

library php-sms

SMS library for PHP

image

andreas-weber/php-sms

SMS library for PHP

  • Thursday, February 26, 2015
  • by andreas-weber
  • Repository
  • 1 Watchers
  • 1 Stars
  • 46 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 4 Versions
  • 2 % Grown

The README.md

andreas-weber/php-sms

Build Status, (*1)

SMS library for PHP 5.3+., (*2)

Supported sms providers

Features

  • Send messages
  • Receive messages (only if gateway supports inbound messages)

Requirements

Check shipped composer.json., (*3)

Installation

Simply add a dependency on andreas-weber/php-sms to your project's Composer composer.json file., (*4)

Usage

Send a message

use AndreasWeber\SMS\Core\Gateway;
use AndreasWeber\SMS\Core\Gateway\Adapter\SMSTrade;
use AndreasWeber\SMS\Core\Message;

// create gateway
$gateway = new Gateway(
    new SMSTrade('XXXXXXXXXXXX'),
    true
);

// create message
$message = new Message(
    '+49160123456789',
    'php-sms',
    'Hello, how are you?'
);

// send message
$response = $gateway->send($message);

// print response
var_dump($response);

Receive messages

use AndreasWeber\SMS\Core\Gateway;
use AndreasWeber\SMS\Core\Gateway\Adapter\TextAnywhere;

// create gateway
$gateway = new Gateway(
    new TextAnywhere('XXXXXXXX', 'XXXXXXXX'),
    true
);

// receive messages
$messages = $gateway->fetch('+49177123456789');

// print messages
var_dump($messages);

Developer

Environment

Boot:, (*5)

vagrant up

Enter virtual machine:, (*6)

vagrant ssh

Run tests:, (*7)

cd /vagrant
vendor/bin/phpunit src/Test/

Build targets

vagrant@andreas-weber:/vagrant$ ant
Buildfile: /vagrant/build.xml

help:
     [echo]
     [echo] The following commands are available:
     [echo]
     [echo] |   +++ Build +++
     [echo] |-- build                (Run the build)
     [echo] |   |-- dependencies     (Install dependencies)
     [echo] |   |-- tests            (Lint all files and run tests)
     [echo] |   |-- metrics          (Generate quality metrics)
     [echo] |-- cleanup              (Cleanup the build directory)
     [echo] |
     [echo] |   +++ Composer +++
     [echo] |-- composer             -> composer-download, composer-install
     [echo] |-- composer-download    (Downloads composer.phar to project)
     [echo] |-- composer-install     (Install all dependencies)
     [echo] |
     [echo] |   +++ Testing +++
     [echo] |-- phpunit              -> phpunit-full
     [echo] |-- phpunit-tests        (Run unit tests)
     [echo] |-- phpunit-full         (Run unit tests and generate code coverage report / logs)
     [echo] |
     [echo] |   +++ Metrics +++
     [echo] |-- coverage             (Show code coverage metric)
     [echo] |-- phploc               (Show lines of code metric)
     [echo] |-- qa                   (Run quality assurance tools)
     [echo] |-- |-- phpcpd           (Show copy paste metric)
     [echo] |-- |-- phpcs            (Show code sniffer metric)
     [echo] |-- |-- phpmd            (Show mess detector metric)
     [echo] |
     [echo] |   +++ Metric Reports +++
     [echo] |-- phploc-report        (Generate lines of code metric report)
     [echo] |-- phpcpd-report        (Generate copy paste metric report)
     [echo] |-- phpcs-report         (Generate code sniffer metric report)
     [echo] |-- phpmd-report         (Generate mess detector metric report)
     [echo] |
     [echo] |   +++ Tools +++
     [echo] |-- lint                 (Lint all php files)
     [echo]

Thoughts

Pull requests are highly appreciated. Built with love. Hope you'll enjoy.. :-), (*8)

The Versions

26/02 2015

dev-master

9999999-dev https://github.com/andreas-weber/php-sms

SMS library for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

by Andreas Weber

27/01 2015

1.0.2

1.0.2.0 https://github.com/andreas-weber/php-sms

SMS library for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3
  • ext-curl 0.0.0.*

 

The Development Requires

by Andreas Weber

22/01 2015

1.0.1

1.0.1.0 https://github.com/andreas-weber/php-sms

SMS library for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3
  • ext-curl 0.0.0.*

 

The Development Requires

by Andreas Weber

15/01 2015

1.0.0

1.0.0.0 https://github.com/andreas-weber/php-sms

SMS library for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3
  • ext-curl 0.0.0.*

 

The Development Requires

by Andreas Weber