Beispiel #1
0
 /**
  * @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;
 }
Beispiel #2
0
 /**
  * @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;
 }