1 | <?php |
||
12 | trait InteractsWithApplication |
||
13 | { |
||
14 | /* ----------------------------------------------------------------- |
||
15 | | Main Methods |
||
16 | | ----------------------------------------------------------------- |
||
17 | */ |
||
18 | |||
19 | /** |
||
20 | * Register multiple service providers. |
||
21 | * |
||
22 | * @param array $providers |
||
23 | */ |
||
24 | protected function registerProviders(array $providers) |
||
30 | |||
31 | /** |
||
32 | * Register a service provider. |
||
33 | * |
||
34 | * @param \Illuminate\Support\ServiceProvider|string $provider |
||
35 | * @param bool $force |
||
36 | * |
||
37 | * @return \Illuminate\Support\ServiceProvider |
||
38 | */ |
||
39 | protected function registerProvider($provider, $force = false) |
||
43 | |||
44 | /** |
||
45 | * Register a console service provider. |
||
46 | * |
||
47 | * @param \Illuminate\Support\ServiceProvider|string $provider |
||
48 | * @param bool $force |
||
49 | * |
||
50 | * @return \Illuminate\Support\ServiceProvider|null |
||
51 | */ |
||
52 | protected function registerConsoleServiceProvider($provider, $force = false) |
||
60 | |||
61 | /** |
||
62 | * Register the package's custom Artisan commands when running in console. |
||
63 | * |
||
64 | * @param array $commands |
||
65 | */ |
||
66 | protected function registerCommands(array $commands) |
||
72 | |||
73 | /** |
||
74 | * Register a binding with the container. |
||
75 | * |
||
76 | * @param string $abstract |
||
77 | * @param \Closure|string|null $concrete |
||
78 | * @param bool $shared |
||
79 | */ |
||
80 | protected function bind($abstract, $concrete = null, $shared = false) |
||
84 | |||
85 | /** |
||
86 | * Register a shared binding in the container. |
||
87 | * |
||
88 | * @param string|array $abstract |
||
89 | * @param \Closure|string|null $concrete |
||
90 | */ |
||
91 | protected function singleton($abstract, $concrete = null) |
||
95 | } |
||
96 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: