1 | <?php |
||
14 | class HealthController extends \luya\console\Command |
||
15 | { |
||
16 | /** |
||
17 | * @var array An array with all folders to check where the value for the key is whether it should be writeable or not. |
||
18 | */ |
||
19 | public $folders = [ |
||
20 | 'public_html/assets' => true, |
||
21 | 'public_html/storage' => true, |
||
22 | 'migrations' => false, |
||
23 | 'vendor' => false, |
||
24 | 'runtime' => true, |
||
25 | ]; |
||
26 | |||
27 | /** |
||
28 | * @var array An array with files to check if they exists or not. |
||
29 | */ |
||
30 | public $files = [ |
||
31 | 'configs/env.php', |
||
32 | 'public_html/index.php', |
||
33 | ]; |
||
34 | |||
35 | /** |
||
36 | * Create all required directories an check whether they are writeable or not. |
||
37 | * |
||
38 | * @return string The action output. |
||
39 | */ |
||
40 | public function actionIndex() |
||
90 | |||
91 | /** |
||
92 | * Test Mail-Component (Use --verbose=1 to enable smtp debug output) |
||
93 | * |
||
94 | * @return boolean Whether successfull or not. |
||
95 | * @throws \Exception On smtp failure |
||
96 | */ |
||
97 | public function actionMailer() |
||
107 | } |
||
108 |
If you suppress an error, we recommend checking for the error condition explicitly: