Files
faveo/vendor/laravelcollective/bus/src/BusServiceProvider.php
Manish Verma 76e85db070 update 1.0.8.0
Commits for version update
2016-10-17 12:02:27 +05:30

52 lines
1.1 KiB
PHP

<?php
namespace Collective\Bus;
use Illuminate\Support\ServiceProvider;
class BusServiceProvider extends ServiceProvider
{
/**
* Indicates if loading of the provider is deferred.
*
* @var bool
*/
protected $defer = true;
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
$this->app->singleton('Collective\Bus\Dispatcher', function ($app) {
return new Dispatcher($app, function () use ($app) {
return $app['Illuminate\Contracts\Queue\Queue'];
});
});
$this->app->alias(
'Collective\Bus\Dispatcher', 'Illuminate\Contracts\Bus\Dispatcher'
);
$this->app->alias(
'Collective\Bus\Dispatcher', 'Illuminate\Contracts\Bus\QueueingDispatcher'
);
}
/**
* Get the services provided by the provider.
*
* @return array
*/
public function provides()
{
return [
'Collective\Bus\Dispatcher',
'Illuminate\Contracts\Bus\Dispatcher',
'Illuminate\Contracts\Bus\QueueingDispatcher',
];
}
}