1 | <?php |
||
17 | class AlertManager implements AlertManagerInterface |
||
18 | { |
||
19 | /** |
||
20 | * @var Session |
||
21 | */ |
||
22 | private $session; |
||
23 | |||
24 | |||
25 | /** |
||
26 | * @param Session $session |
||
27 | */ |
||
28 | public function __construct(Session $session) |
||
32 | |||
33 | /** |
||
34 | * @inheritdoc |
||
35 | */ |
||
36 | public function addAlert(AlertInterface $alert) |
||
40 | |||
41 | /** |
||
42 | * @inheritdoc |
||
43 | */ |
||
44 | public function getAlerts() |
||
58 | |||
59 | /** |
||
60 | * Creates alert objects for a type |
||
61 | * |
||
62 | * @param string $type |
||
63 | * @param array $messages |
||
64 | * @return Alert[] |
||
65 | */ |
||
66 | private function createAlertsForType($type, array $messages) |
||
76 | |||
77 | /** |
||
78 | * Gets allowed alert types |
||
79 | * |
||
80 | * @return array |
||
81 | */ |
||
82 | private static function getAlertTypes() |
||
91 | } |