Completed
Push — v1.5.7 ( 10f56a )
by Bradley
02:37
created

SettingServiceProvider::boot()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php namespace Cornford\Setter;
2
3
use Illuminate\Support\ServiceProvider;
4
5
class SettingServiceProvider extends ServiceProvider {
6
7
	/**
8
	 * Indicates if loading of the provider is deferred.
9
	 *
10
	 * @var bool
11
	 */
12
	protected $defer = false;
13
14
	/**
15
	 * Bootstrap the application events.
16
	 *
17
	 * @return void
18
	 */
19
	public function boot()
20
	{
21
		$this->package('cornford/setter');
22
	}
23
24
	/**
25
	 * Register the service provider.
26
	 *
27
	 * @return void
28
	 */
29
	public function register()
30
	{
31
		$this->app['setting'] = $this->app->share(function()
32
		{
33
			return new Setting(
34
				$this->app->make('Illuminate\Database\DatabaseManager'),
35
				$this->app->make('Illuminate\Config\Repository'),
36
				$this->app->make('Illuminate\Cache\Repository')
37
			);
38
		});
39
	}
40
41
	/**
42
	 * Get the services provided by the provider.
43
	 *
44
	 * @return array
45
	 */
46
	public function provides()
47
	{
48
		return array('setting');
49
	}
50
51
}
52