1 | <?php namespace Cornford\Alerter; |
||
6 | class AlerterServiceProvider extends ServiceProvider { |
||
7 | |||
8 | /** |
||
9 | * Indicates if loading of the provider is deferred. |
||
10 | * |
||
11 | * @var bool |
||
12 | */ |
||
13 | protected $defer = true; |
||
14 | |||
15 | /** |
||
16 | * Bootstrap the application events. |
||
17 | * |
||
18 | * @return void |
||
19 | */ |
||
20 | public function boot() |
||
24 | |||
25 | /** |
||
26 | * Register the service provider. |
||
27 | * |
||
28 | * @return void |
||
29 | */ |
||
30 | public function register() |
||
37 | |||
38 | /** |
||
39 | * Get the services provided by the provider. |
||
40 | * |
||
41 | * @return array |
||
42 | */ |
||
43 | public function provides() |
||
47 | |||
48 | } |
||
49 |
If you implement
__call
and you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.This is often the case, when
__call
is implemented by a parent class and only the child class knows which methods exist: