1 | <?php |
||
16 | class Offline |
||
17 | { |
||
18 | /** |
||
19 | * Determines if the tool is offline |
||
20 | * @return bool |
||
21 | */ |
||
22 | 1 | public static function isOffline() |
|
28 | |||
29 | /** |
||
30 | * Gets the offline message |
||
31 | * |
||
32 | * @param bool $external |
||
33 | * @param null $message |
||
34 | * |
||
35 | * @return string |
||
36 | */ |
||
37 | 1 | public static function getOfflineMessage($external, $message = null) |
|
69 | } |
||
70 |
Instead of relying on
global
state, we recommend one of these alternatives:1. Pass all data via parameters
2. Create a class that maintains your state