/** * Init flash messages. * * @param DIBehaviour|DI $di Dependency Injection. * * @return void */ protected function _initFlash($di) { $flashData = ['error' => 'alert alert-danger', 'success' => 'alert alert-success', 'notice' => 'alert alert-info']; $di->set('flash', function () use($flashData) { $flash = new FlashDirect($flashData); return $flash; }); $di->set('flashSession', function () use($flashData) { $flash = new FlashSession($flashData); return $flash; }); }