/** * @param Notification $notification * * @return bool */ public function check(Notification $notification) { $notificationParams = $notification->getParams(); foreach ($this->values as $key => $value) { if (!array_key_exists($key, $notificationParams) || $notificationParams[$key] !== $value) { return false; } } return true; }
/** * @param Notification $notification * * @return bool */ public function check(Notification $notification) { $notificationParams = $notification->getParams(); foreach ($this->params as $param) { if (!array_key_exists($param, $notificationParams)) { return false; } } return true; }
/** * @param Notification $notification */ protected function process(Notification $notification) { if (is_file($this->layout)) { ob_start(); include $this->layout; echo ob_get_clean(); } else { echo $notification->getMessage() . PHP_EOL; } }