diff options
Diffstat (limited to 'backyard/php-api/trunk/app/Providers')
5 files changed, 167 insertions, 0 deletions
diff --git a/backyard/php-api/trunk/app/Providers/AppServiceProvider.php b/backyard/php-api/trunk/app/Providers/AppServiceProvider.php new file mode 100644 index 0000000..ff9d6f6 --- /dev/null +++ b/backyard/php-api/trunk/app/Providers/AppServiceProvider.php @@ -0,0 +1,34 @@ +<?php namespace App\Providers; + +use Illuminate\Support\ServiceProvider; + +class AppServiceProvider extends ServiceProvider { + + /** + * Bootstrap any application services. + * + * @return void + */ + public function boot() + { + // + } + + /** + * Register any application services. + * + * This service provider is a great spot to register your various container + * bindings with the application. As you can see, we are registering our + * "Registrar" implementation here. You can add your own bindings too! + * + * @return void + */ + public function register() + { + $this->app->bind( + 'Illuminate\Contracts\Auth\Registrar', + 'App\Services\Registrar' + ); + } + +} diff --git a/backyard/php-api/trunk/app/Providers/BusServiceProvider.php b/backyard/php-api/trunk/app/Providers/BusServiceProvider.php new file mode 100644 index 0000000..f0d9be6 --- /dev/null +++ b/backyard/php-api/trunk/app/Providers/BusServiceProvider.php @@ -0,0 +1,34 @@ +<?php namespace App\Providers; + +use Illuminate\Bus\Dispatcher; +use Illuminate\Support\ServiceProvider; + +class BusServiceProvider extends ServiceProvider { + + /** + * Bootstrap any application services. + * + * @param \Illuminate\Bus\Dispatcher $dispatcher + * @return void + */ + public function boot(Dispatcher $dispatcher) + { + $dispatcher->mapUsing(function($command) + { + return Dispatcher::simpleMapping( + $command, 'App\Commands', 'App\Handlers\Commands' + ); + }); + } + + /** + * Register any application services. + * + * @return void + */ + public function register() + { + // + } + +} diff --git a/backyard/php-api/trunk/app/Providers/ConfigServiceProvider.php b/backyard/php-api/trunk/app/Providers/ConfigServiceProvider.php new file mode 100644 index 0000000..06e5799 --- /dev/null +++ b/backyard/php-api/trunk/app/Providers/ConfigServiceProvider.php @@ -0,0 +1,23 @@ +<?php namespace App\Providers; + +use Illuminate\Support\ServiceProvider; + +class ConfigServiceProvider extends ServiceProvider { + + /** + * Overwrite any vendor / package configuration. + * + * This service provider is intended to provide a convenient location for you + * to overwrite any "vendor" or package configuration that you may want to + * modify before the application handles the incoming request / command. + * + * @return void + */ + public function register() + { + config([ + // + ]); + } + +} diff --git a/backyard/php-api/trunk/app/Providers/EventServiceProvider.php b/backyard/php-api/trunk/app/Providers/EventServiceProvider.php new file mode 100644 index 0000000..1cece99 --- /dev/null +++ b/backyard/php-api/trunk/app/Providers/EventServiceProvider.php @@ -0,0 +1,32 @@ +<?php namespace App\Providers; + +use Illuminate\Contracts\Events\Dispatcher as DispatcherContract; +use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; + +class EventServiceProvider extends ServiceProvider { + + /** + * The event handler mappings for the application. + * + * @var array + */ + protected $listen = [ + 'event.name' => [ + 'EventListener', + ], + ]; + + /** + * Register any other events for your application. + * + * @param \Illuminate\Contracts\Events\Dispatcher $events + * @return void + */ + public function boot(DispatcherContract $events) + { + parent::boot($events); + + // + } + +} diff --git a/backyard/php-api/trunk/app/Providers/RouteServiceProvider.php b/backyard/php-api/trunk/app/Providers/RouteServiceProvider.php new file mode 100644 index 0000000..afa34c8 --- /dev/null +++ b/backyard/php-api/trunk/app/Providers/RouteServiceProvider.php @@ -0,0 +1,44 @@ +<?php namespace App\Providers; + +use Illuminate\Routing\Router; +use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; + +class RouteServiceProvider extends ServiceProvider { + + /** + * This namespace is applied to the controller routes in your routes file. + * + * In addition, it is set as the URL generator's root namespace. + * + * @var string + */ + protected $namespace = 'App\Http\Controllers'; + + /** + * Define your route model bindings, pattern filters, etc. + * + * @param \Illuminate\Routing\Router $router + * @return void + */ + public function boot(Router $router) + { + parent::boot($router); + + // + } + + /** + * Define the routes for the application. + * + * @param \Illuminate\Routing\Router $router + * @return void + */ + public function map(Router $router) + { + $router->group(['namespace' => $this->namespace], function($router) + { + require app_path('Http/routes.php'); + }); + } + +} |