Example #1
0
 public static function nextEvent(PlIterator $it, PlUser $user)
 {
     while ($body = $it->next()) {
         $uf = UserFilter::getLegacy($body['promo_min'], $body['promo_max']);
         if ($uf->checkUser($user)) {
             return $body;
         }
     }
     return null;
 }
Example #2
0
 public function next()
 {
     while ($n = $this->it->next()) {
         $uf = UserFilter::getLegacy($n['promo_min'], $n['promo_max']);
         if ($uf->checkUser($this->user)) {
             return $n;
         }
     }
     return null;
 }