1 | <?php namespace Distilleries\Expendable; |
||
15 | class ExpendableServiceProvider extends ServiceProvider { |
||
16 | |||
17 | /** |
||
18 | * Indicates if loading of the provider is deferred. |
||
19 | * |
||
20 | * @var bool |
||
21 | */ |
||
22 | protected $defer = true; |
||
23 | |||
24 | /** |
||
25 | * Bootstrap the application events. |
||
26 | * |
||
27 | * @return void |
||
28 | */ |
||
29 | 668 | public function boot() |
|
49 | |||
50 | /** |
||
51 | * Register the service provider. |
||
52 | * |
||
53 | * @return void |
||
54 | */ |
||
55 | 668 | public function register() |
|
56 | { |
||
57 | |||
58 | $this->app->singleton('Distilleries\Expendable\Contracts\LockableContract', function($app) |
||
|
|||
59 | { |
||
60 | 8 | return new User; |
|
61 | 668 | }); |
|
62 | |||
63 | $this->app->singleton('Distilleries\Expendable\Contracts\StateDisplayerContract', function($app) |
||
64 | { |
||
65 | 581 | return new StateDisplayer($app['view'], $app['config']->get('expendable')); |
|
66 | 668 | }); |
|
67 | |||
68 | $this->app->singleton('Distilleries\Expendable\Contracts\LayoutManagerContract', function($app) |
||
69 | { |
||
70 | 316 | return new LayoutManager($app['config']->get('expendable'), $app['view'], $app['files'], app('Distilleries\Expendable\Contracts\StateDisplayerContract')); |
|
71 | 668 | }); |
|
72 | |||
73 | $this->app->singleton('Distilleries\MailerSaver\Contracts\MailModelContract', function() |
||
74 | { |
||
75 | 16 | return new Email; |
|
76 | 668 | }); |
|
77 | |||
78 | 668 | $this->alias(); |
|
79 | 668 | $this->registerCommands(); |
|
80 | 668 | $this->registerImporters(); |
|
81 | 668 | $this->registerExporters(); |
|
82 | |||
83 | |||
84 | 501 | } |
|
85 | |||
86 | 668 | protected function registerImporters() |
|
87 | { |
||
88 | $this->app->singleton('CsvImporterContract', function() |
||
89 | { |
||
90 | 4 | return new CsvImporter; |
|
91 | 668 | }); |
|
92 | |||
93 | $this->app->singleton('XlsImporterContract', function() |
||
94 | { |
||
95 | 502 | return new XlsImporter; |
|
96 | 668 | }); |
|
97 | |||
98 | $this->app->singleton('XlsxImporterContract', function() |
||
99 | { |
||
100 | return new XlsImporter; |
||
101 | 668 | }); |
|
102 | 501 | } |
|
103 | |||
104 | 668 | protected function registerExporters() |
|
118 | |||
119 | |||
120 | 668 | protected function registerCommands() |
|
133 | |||
134 | 44 | public function provides() |
|
148 | |||
149 | |||
150 | 668 | public function alias() |
|
158 | } |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.