1 | <?php |
||
9 | class MaintenanceShell extends Shell |
||
10 | { |
||
11 | /** |
||
12 | * The setting key to modify. |
||
13 | * |
||
14 | * @var string |
||
15 | */ |
||
16 | protected $settingKey = 'Site.maintenance'; |
||
17 | |||
18 | /** |
||
19 | * Initialize method. |
||
20 | * |
||
21 | * @return void |
||
22 | */ |
||
23 | public function initialize() |
||
28 | |||
29 | /** |
||
30 | * Display help for this console. |
||
31 | * |
||
32 | * @return ConsoleOptionParser |
||
33 | */ |
||
34 | public function getOptionParser() |
||
47 | |||
48 | /** |
||
49 | * Put the application in maintenance mode. |
||
50 | * |
||
51 | * @return bool |
||
52 | */ |
||
53 | public function down() |
||
57 | |||
58 | /** |
||
59 | * Remove the application from the maintenance mode. |
||
60 | * |
||
61 | * @return bool |
||
62 | */ |
||
63 | public function up() |
||
67 | |||
68 | /** |
||
69 | * Handle the maintenance. |
||
70 | * |
||
71 | * @param string $type The type of the maintenance; up, down. |
||
72 | * @param string $value The value of the setting key. |
||
73 | * |
||
74 | * @return bool |
||
75 | */ |
||
76 | protected function handleMaintenance($type, $value) |
||
105 | |||
106 | /** |
||
107 | * Check if the setting key exist in the database. |
||
108 | * |
||
109 | * @param null|App\Model\Entity\Setting $setting The setting to check. |
||
110 | * |
||
111 | * @return bool |
||
112 | */ |
||
113 | protected function checkKey($setting) |
||
128 | } |
||
129 |
Since your code implements the magic getter
_get
, this function will be called for any read access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.