-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/vendor | ||
composer.phar | ||
composer.lock | ||
.DS_Store |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
language: php | ||
|
||
php: | ||
- 5.3 | ||
- 5.4 | ||
- 5.5 | ||
- 5.6 | ||
- hhvm | ||
|
||
before_script: | ||
- composer self-update | ||
- composer install --prefer-source --no-interaction --dev | ||
|
||
script: phpunit |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"name": "artistan/nexmo", | ||
"description": "", | ||
"authors": [ | ||
{ | ||
"name": "Charles Peterson", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"repositories": [ | ||
{ | ||
"type": "vcs", | ||
"url": "git://github.com/orchestral/phpseclib.git" | ||
} | ||
], | ||
"require": { | ||
"php": ">=5.3.0", | ||
"illuminate/support": "4.1.*" | ||
}, | ||
"require-dev":{ | ||
"phpunit/phpunit": "3.7.*", | ||
"orchestra/testbench": "2.1.*", | ||
"mockery/mockery": "dev-master@dev" | ||
}, | ||
"autoload": { | ||
"psr-0": { | ||
"Artistan\\Nexmo": "src/" | ||
} | ||
}, | ||
"minimum-stability": "stable" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit backupGlobals="false" | ||
backupStaticAttributes="false" | ||
bootstrap="vendor/autoload.php" | ||
colors="true" | ||
convertErrorsToExceptions="true" | ||
convertNoticesToExceptions="true" | ||
convertWarningsToExceptions="true" | ||
processIsolation="false" | ||
stopOnFailure="false" | ||
syntaxCheck="false" | ||
> | ||
<testsuites> | ||
<testsuite name="Package Test Suite"> | ||
<directory suffix=".php">./tests/</directory> | ||
</testsuite> | ||
</testsuites> | ||
</phpunit> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
/** | ||
* User: Charles Peterson | ||
*/ | ||
namespace Artistan\Nexmo\Facades; | ||
use Illuminate\Support\Facades\Facade; | ||
|
||
class Account extends Facade { | ||
|
||
protected static function getFacadeAccessor() | ||
{ | ||
return 'nexmoaccount'; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
/** | ||
* User: Charles Peterson | ||
*/ | ||
namespace Artistan\Nexmo\Facades\Message; | ||
use Illuminate\Support\Facades\Facade; | ||
|
||
class Sms extends Facade { | ||
|
||
protected static function getFacadeAccessor() | ||
{ | ||
return 'nexmosmsmessage'; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
/** | ||
* User: Charles Peterson | ||
*/ | ||
namespace Artistan\Nexmo\Facades; | ||
use Illuminate\Support\Facades\Facade; | ||
|
||
class Receipt extends Facade { | ||
|
||
protected static function getFacadeAccessor() | ||
{ | ||
return 'nexmoreceipt'; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
<?php namespace Artistan\Nexmo; | ||
|
||
use Illuminate\Support\ServiceProvider; | ||
use Artistan\Nexmo\Service\Account; | ||
use Artistan\Nexmo\Service\Receipt; | ||
use Artistan\Nexmo\Service\Message\Sms as MessageSms; | ||
|
||
class NexmoServiceProvider extends ServiceProvider { | ||
|
||
/** | ||
* Indicates if loading of the provider is deferred. | ||
* | ||
* @var bool | ||
*/ | ||
protected $defer = false; | ||
|
||
/** | ||
* Bootstrap the application events. | ||
* | ||
* @return void | ||
*/ | ||
public function boot() | ||
{ | ||
$this->package('artistan/nexmo'); | ||
} | ||
|
||
/** | ||
* Register the service provider. | ||
* | ||
* @return void | ||
*/ | ||
public function register() | ||
{ | ||
// Receipt | ||
$this->app['nexmoreceipt'] = $this->app->share(function($app) | ||
{ | ||
return new Account(); | ||
}); | ||
|
||
$this->app->booting(function() | ||
{ | ||
$loader = \Illuminate\Foundation\AliasLoader::getInstance(); | ||
$loader->alias('NexmoReceipt', 'Artistan\Nexmo\Facades\Receipt'); | ||
}); | ||
|
||
// Account | ||
$this->app['nexmoaccount'] = $this->app->share(function($app) | ||
{ | ||
return new Account(); | ||
}); | ||
|
||
$this->app->booting(function() | ||
{ | ||
$loader = \Illuminate\Foundation\AliasLoader::getInstance(); | ||
$loader->alias('NexmoAccount', 'Artistan\Nexmo\Facades\Account'); | ||
}); | ||
|
||
// SMS Message | ||
$this->app['nexmosmsmessage'] = $this->app->share(function($app) | ||
{ | ||
return new MessageSms(); | ||
}); | ||
|
||
$this->app->booting(function() | ||
{ | ||
$loader = \Illuminate\Foundation\AliasLoader::getInstance(); | ||
$loader->alias('NexmoSmsMessage', 'Artistan\Nexmo\Facades\Message\Sms'); | ||
}); | ||
} | ||
|
||
/** | ||
* Get the services provided by the provider. | ||
* | ||
* @return array | ||
*/ | ||
public function provides() | ||
{ | ||
return array('nexmosmsmessage','nexmoreceipt','nexmoaccount'); | ||
} | ||
|
||
} |