1 | <?php namespace Arcanedev\Support; |
||
13 | abstract class ServiceProvider extends IlluminateServiceProvider |
||
14 | { |
||
15 | /* ----------------------------------------------------------------- |
||
16 | | Properties |
||
17 | | ----------------------------------------------------------------- |
||
18 | */ |
||
19 | |||
20 | /** |
||
21 | * The application instance. |
||
22 | * |
||
23 | * @var \Illuminate\Foundation\Application |
||
24 | */ |
||
25 | protected $app; |
||
26 | |||
27 | /** |
||
28 | * The aliases collection. |
||
29 | * |
||
30 | * @var array |
||
31 | */ |
||
32 | protected $aliases = []; |
||
33 | |||
34 | /** |
||
35 | * Alias loader. |
||
36 | * |
||
37 | * @var \Illuminate\Foundation\AliasLoader |
||
38 | */ |
||
39 | private $aliasLoader; |
||
40 | |||
41 | /* ----------------------------------------------------------------- |
||
42 | | Constructor |
||
43 | | ----------------------------------------------------------------- |
||
44 | */ |
||
45 | |||
46 | /** |
||
47 | * Create a new service provider instance. |
||
48 | * |
||
49 | * @param \Illuminate\Contracts\Foundation\Application $app |
||
50 | */ |
||
51 | 9 | public function __construct(Application $app) |
|
57 | |||
58 | /* ----------------------------------------------------------------- |
||
59 | | Main Methods |
||
60 | | ----------------------------------------------------------------- |
||
61 | */ |
||
62 | |||
63 | /** |
||
64 | * Register the service provider. |
||
65 | */ |
||
66 | 9 | public function register() |
|
70 | |||
71 | /** |
||
72 | * Boot the service provider. |
||
73 | */ |
||
74 | public function boot() |
||
78 | |||
79 | /** |
||
80 | * Register a binding with the container. |
||
81 | * |
||
82 | * @param string|array $abstract |
||
83 | * @param \Closure|string|null $concrete |
||
84 | * @param bool $shared |
||
85 | */ |
||
86 | public function bind($abstract, $concrete = null, $shared = false) |
||
90 | |||
91 | /** |
||
92 | * Register a shared binding in the container. |
||
93 | * |
||
94 | * @param string|array $abstract |
||
95 | * @param \Closure|string|null $concrete |
||
96 | */ |
||
97 | protected function singleton($abstract, $concrete = null) |
||
101 | |||
102 | /** |
||
103 | * Register a service provider. |
||
104 | * |
||
105 | * @param \Illuminate\Support\ServiceProvider|string $provider |
||
106 | * @param array $options |
||
107 | * @param bool $force |
||
108 | * |
||
109 | * @return \Illuminate\Support\ServiceProvider |
||
110 | */ |
||
111 | protected function registerProvider($provider, array $options = [], $force = false) |
||
115 | |||
116 | /** |
||
117 | * Register multiple service providers. |
||
118 | * |
||
119 | * @param array $providers |
||
120 | */ |
||
121 | protected function registerProviders(array $providers) |
||
127 | |||
128 | /** |
||
129 | * Register a console service provider. |
||
130 | * |
||
131 | * @param \Illuminate\Support\ServiceProvider|string $provider |
||
132 | * @param array $options |
||
133 | * @param bool $force |
||
134 | * |
||
135 | * @return \Illuminate\Support\ServiceProvider|null |
||
136 | */ |
||
137 | protected function registerConsoleServiceProvider($provider, array $options = [], $force = false) |
||
144 | |||
145 | /** |
||
146 | * Register aliases (Facades). |
||
147 | */ |
||
148 | protected function registerAliases() |
||
158 | |||
159 | /** |
||
160 | * Add an aliases to the loader. |
||
161 | * |
||
162 | * @param array $aliases |
||
163 | * |
||
164 | * @return self |
||
165 | */ |
||
166 | protected function aliases(array $aliases) |
||
174 | |||
175 | /** |
||
176 | * Add an alias to the loader. |
||
177 | * |
||
178 | * @param string $class |
||
179 | * @param string $alias |
||
180 | * |
||
181 | * @return self |
||
182 | */ |
||
183 | protected function alias($class, $alias) |
||
189 | |||
190 | /* ----------------------------------------------------------------- |
||
191 | | Services |
||
192 | | ----------------------------------------------------------------- |
||
193 | */ |
||
194 | |||
195 | /** |
||
196 | * Get the config repository instance. |
||
197 | * |
||
198 | * @return \Illuminate\Config\Repository |
||
199 | */ |
||
200 | protected function config() |
||
204 | |||
205 | /** |
||
206 | * Get the filesystem instance. |
||
207 | * |
||
208 | * @return \Illuminate\Filesystem\Filesystem |
||
209 | */ |
||
210 | protected function filesystem() |
||
214 | } |
||
215 |
This check looks at variables that have been passed in as parameters and are passed out again to other methods.
If the outgoing method call has stricter type requirements than the method itself, an issue is raised.
An additional type check may prevent trouble.