mirror of
https://github.com/fleetbase/fleetbase.git
synced 2026-01-08 07:16:49 +00:00
Switched autoloading to PSR-4
This commit is contained in:
@@ -19,8 +19,8 @@
|
||||
"illuminate/support": "4.*"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"Aloha\\Twilio": "src/"
|
||||
"psr-4": {
|
||||
"Aloha\\Twilio\\": "src/"
|
||||
}
|
||||
},
|
||||
"minimum-stability": "stable"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
namespace Aloha\Twilio\Facades;
|
||||
namespace Aloha\Twilio\Support\Laravel\Facades;
|
||||
|
||||
use Illuminate\Support\Facades\Facade;
|
||||
use Illuminate\Support\Facades\Facade as BaseFacade;
|
||||
|
||||
class Twilio extends Facade
|
||||
class Facade extends BaseFacade
|
||||
{
|
||||
/**
|
||||
* Get the registered name of the component.
|
||||
@@ -1,42 +1,42 @@
|
||||
<?php
|
||||
namespace Aloha\Twilio;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class TwilioServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Boot Method
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
// Register commands.
|
||||
$this->commands('twilio.sms', 'twilio.call');
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the service provider.
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
// Register manager for usage with the Facade.
|
||||
$this->app->singleton('twilio', function ($app) {
|
||||
$config = $app['config']->get('services.twilio');
|
||||
return new Manager($config['default'], $config['connections']);
|
||||
});
|
||||
|
||||
// Define an alias.
|
||||
$this->app->alias('twilio', 'Aloha\Twilio\Manager');
|
||||
|
||||
// Register Twilio Test SMS Command.
|
||||
$this->app->singleton('twilio.sms', 'Aloha\Twilio\Commands\TwilioSmsCommand');
|
||||
|
||||
// Register Twilio Test Call Command.
|
||||
$this->app->singleton('twilio.call', 'Aloha\Twilio\Commands\TwilioCallCommand');
|
||||
|
||||
// Register TwilioInterface concretion.
|
||||
$this->app->singleton('Aloha\Twilio\TwilioInterface', function ($app) {
|
||||
return $app->make('twilio')->defaultConnection();
|
||||
});
|
||||
}
|
||||
}
|
||||
<?php
|
||||
namespace Aloha\Twilio\Support\Laravel;
|
||||
|
||||
use Illuminate\Support\ServiceProvider as BaseServiceProvider;
|
||||
|
||||
class ServiceProvider extends BaseServiceProvider
|
||||
{
|
||||
/**
|
||||
* Boot Method
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
// Register commands.
|
||||
$this->commands('twilio.sms', 'twilio.call');
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the service provider.
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
// Register manager for usage with the Facade.
|
||||
$this->app->singleton('twilio', function ($app) {
|
||||
$config = $app['config']->get('services.twilio');
|
||||
return new Manager($config['default'], $config['connections']);
|
||||
});
|
||||
|
||||
// Define an alias.
|
||||
$this->app->alias('twilio', 'Aloha\Twilio\Manager');
|
||||
|
||||
// Register Twilio Test SMS Command.
|
||||
$this->app->singleton('twilio.sms', 'Aloha\Twilio\Commands\TwilioSmsCommand');
|
||||
|
||||
// Register Twilio Test Call Command.
|
||||
$this->app->singleton('twilio.call', 'Aloha\Twilio\Commands\TwilioCallCommand');
|
||||
|
||||
// Register TwilioInterface concretion.
|
||||
$this->app->singleton('Aloha\Twilio\TwilioInterface', function ($app) {
|
||||
return $app->make('twilio')->defaultConnection();
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user