1 | <?php |
||
11 | class SeedCommand extends Command |
||
12 | { |
||
13 | use ModuleCommandTrait; |
||
14 | |||
15 | /** |
||
16 | * The console command name. |
||
17 | * |
||
18 | * @var string |
||
19 | */ |
||
20 | protected $name = 'module:seed'; |
||
21 | |||
22 | /** |
||
23 | * The console command description. |
||
24 | * |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $description = 'Run database seeder from the specified module or from all modules.'; |
||
28 | |||
29 | /** |
||
30 | * Execute the console command. |
||
31 | * |
||
32 | * @return mixed |
||
33 | */ |
||
34 | public function fire() |
||
76 | |||
77 | /** |
||
78 | * Seed the specified module. |
||
79 | * |
||
80 | * @parama string $name |
||
81 | * |
||
82 | * @return array |
||
83 | */ |
||
84 | protected function dbseed($name) |
||
100 | |||
101 | /** |
||
102 | * Get master database seeder name for the specified module. |
||
103 | * |
||
104 | * @param string $name |
||
105 | * |
||
106 | * @return string |
||
107 | */ |
||
108 | public function getSeederName($name) |
||
116 | |||
117 | /** |
||
118 | * Get the console command arguments. |
||
119 | * |
||
120 | * @return array |
||
121 | */ |
||
122 | 38 | protected function getArguments() |
|
128 | |||
129 | /** |
||
130 | * Get the console command options. |
||
131 | * |
||
132 | * @return array |
||
133 | */ |
||
134 | 38 | protected function getOptions() |
|
143 | } |
||
144 |
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: