1 | <?php |
||
11 | class GeneratorCommand extends Command |
||
12 | { |
||
13 | /** |
||
14 | * Current database being exported or migrated. |
||
15 | * |
||
16 | * @var string |
||
17 | **/ |
||
18 | protected $database; |
||
19 | |||
20 | /** |
||
21 | * Get the database name from the app/config/database.php file. |
||
22 | * |
||
23 | * @return string |
||
24 | */ |
||
25 | protected function getDatabaseName() |
||
32 | |||
33 | //end getDatabaseName() |
||
34 | |||
35 | protected function blockMessage($title, $message, $style = 'info') |
||
46 | |||
47 | //end blockMessage() |
||
48 | |||
49 | protected function sectionMessage($title, $message) |
||
58 | |||
59 | //end sectionMessage() |
||
60 | |||
61 | protected function getArguments() |
||
71 | |||
72 | //end getArguments() |
||
73 | |||
74 | protected function getOptions() |
||
86 | |||
87 | //end getOptions() |
||
88 | |||
89 | protected function fireAction($action, $database) |
||
105 | |||
106 | //end fireAction() |
||
107 | }//end class |
||
108 |
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: