Since $autoSave is declared private, accessing it with static will lead to errors in possible sub-classes; you can either use self, or increase the visibility of $autoSave to at least protected.
Loading history...
18
$_SESSION['alerts'][] = $alert;
19
}
20
}
21
22
/**
23
* Liga/Desliga o salvamento automático de alertas na sessão
24
* @param boolean $mode
25
*/
26
public static function setAutoSave($mode = true) {
Since $autoSave is declared private, accessing it with static will lead to errors in possible sub-classes; you can either use self, or increase the visibility of $autoSave to at least protected.
Loading history...
28
}
29
30
/**
31
* Mostra os alertas criados, podendo filtrar por $type e/ou $group
32
* Removendo-os da sessão
33
* @param string $type
34
* @param string $group
35
*/
36
public static function showAlerts($type = '', $group = '') {
37
foreach (static::getAlerts($type, $group) as $i => $alert) {
38
$alert->load();
39
unset($_SESSION['alerts'][$i]);
40
}
41
}
42
43
/**
44
* Retorna alertas criados, podendo filtrar por $type e/ou $group
45
* @param string $type
46
* @param string $group
47
* @return Alert[]
48
*/
49
public static function getAlerts($type = '', $group = '') {