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; }
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; }