1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* @package Cadmium\System\Frames |
5
|
|
|
* @author Anton Romanov |
6
|
|
|
* @copyright Copyright (c) 2015-2017, Anton Romanov |
7
|
|
|
* @link http://cadmium-cms.com |
8
|
|
|
*/ |
9
|
|
|
|
10
|
|
|
namespace Frames { |
11
|
|
|
|
12
|
|
|
use Modules\Extend, Date, Language, Template; |
13
|
|
|
|
14
|
|
|
abstract class Status extends \Utils\View { |
15
|
|
|
|
16
|
|
|
/** |
17
|
|
|
* Display a status screen |
18
|
|
|
*/ |
19
|
|
|
|
20
|
|
|
private static function display(string $view, string $title, int $status) { |
21
|
|
|
|
22
|
|
|
$screen = self::get($view); |
23
|
|
|
|
24
|
|
|
# Set data |
25
|
|
|
|
26
|
|
|
$screen->language = Extend\Languages::get('iso'); |
|
|
|
|
27
|
|
|
|
28
|
|
|
$screen->title = Language::get($title); |
|
|
|
|
29
|
|
|
|
30
|
|
|
$screen->copyright = Date::getYear(); |
|
|
|
|
31
|
|
|
|
32
|
|
|
# ------------------------ |
33
|
|
|
|
34
|
|
|
Template::output($screen, $status); |
35
|
|
|
} |
36
|
|
|
|
37
|
|
|
/** |
38
|
|
|
* Display the 404 error screen |
39
|
|
|
*/ |
40
|
|
|
|
41
|
|
|
public static function displayError404() { |
42
|
|
|
|
43
|
|
|
self::display('Main/Status/Error404', 'STATUS_TITLE_404', STATUS_CODE_404); |
44
|
|
|
} |
45
|
|
|
|
46
|
|
|
/** |
47
|
|
|
* Display the maintenance screen |
48
|
|
|
*/ |
49
|
|
|
|
50
|
|
|
public static function displayMaintenance() { |
51
|
|
|
|
52
|
|
|
self::display('Main/Status/Maintenance', 'STATUS_TITLE_MAINTENANCE', STATUS_CODE_503); |
53
|
|
|
} |
54
|
|
|
|
55
|
|
|
/** |
56
|
|
|
* Display the update screen |
57
|
|
|
*/ |
58
|
|
|
|
59
|
|
|
public static function displayUpdate() { |
60
|
|
|
|
61
|
|
|
self::display('Main/Status/Update', 'STATUS_TITLE_UPDATE', STATUS_CODE_503); |
62
|
|
|
} |
63
|
|
|
} |
64
|
|
|
} |
65
|
|
|
|
Since your code implements the magic setter
_set
, this function will be called for any write access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.Since the property has write access only, you can use the @property-write 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.