public function handle(Event $event) { $manager = new NotificationManager(); $notificationType = $event->name; $manager->setNotificationType($notificationType); $manager->setUser($event->args[0]); if (isset($event->args[1])) { $notificationObject = $event->args[1]; $manager->setNotificationObject($notificationObject); } if (isset($event->args[1])) { $time = $event->args[2]; $manager->add($time); } }
public function add() { NotificationManager::add($this->id_pseudo, $this->id_article, $this->message); }