1 | <?php |
||
24 | abstract class AbstractTypo3Task extends AbstractTask |
||
25 | { |
||
26 | /** |
||
27 | * namePrefix |
||
28 | * |
||
29 | * @var string |
||
30 | */ |
||
31 | protected $namePrefix = 'typo3/'; |
||
32 | |||
33 | /** |
||
34 | * getName |
||
35 | * |
||
36 | * @return string |
||
37 | */ |
||
38 | public function getName(): string |
||
42 | |||
43 | /** |
||
44 | * getDescription |
||
45 | * |
||
46 | * @return string |
||
47 | */ |
||
48 | public function getDescription(): string |
||
52 | |||
53 | /** |
||
54 | * getContextCommand |
||
55 | * |
||
56 | * @param $cmd |
||
57 | * @param array $options |
||
58 | * @return string |
||
59 | */ |
||
60 | protected function getContextCommand($cmd, array $options): string |
||
71 | |||
72 | /** |
||
73 | * getOptions |
||
74 | * |
||
75 | * @param array $defaults |
||
76 | * @return array |
||
77 | */ |
||
78 | protected function getOptions(array $defaults): array |
||
88 | |||
89 | /** |
||
90 | * executeCommand |
||
91 | * |
||
92 | * @param $command |
||
93 | * @return bool |
||
94 | */ |
||
95 | protected function executeCommand($command): bool |
||
102 | } |
||
103 |
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: