current(). * * @var DateTimeInterface */ protected $currentDate; /** * The current item in the list. * * You can get this number with the key() method. * * @var int */ protected $counter = 0; /** * Array with the RRULE dates. * * @var array */ protected $dates = []; /** * Creates the Iterator. * * @param string|array $rrule */ public function __construct($rrule, DateTimeInterface $start) { $this->startDate = $start; $this->parseRDate($rrule); $this->currentDate = clone $this->startDate; } #[\ReturnTypeWillChange] public function current() { if (!$this->valid()) { return; } return clone $this->currentDate; } /** * Returns the current item number. * * @return int */ #[\ReturnTypeWillChange] public function key() { return $this->counter; } /** * Returns whether the current item is a valid item for the recurrence * iterator. * * @return bool */ #[\ReturnTypeWillChange] public function valid() { return $this->counter <= count($this->dates); } /** * Resets the iterator. * * @return void */ #[\ReturnTypeWillChange] public function rewind() { $this->currentDate = clone $this->startDate; $this->counter = 0; } /** * Goes on to the next iteration. * * @return void */ #[\ReturnTypeWillChange] public function next() { ++$this->counter; if (!$this->valid()) { return; } $this->currentDate = DateTimeParser::parse( $this->dates[$this->counter - 1], $this->startDate->getTimezone() ); } /** * Returns true if this recurring event never ends. * * @return bool */ public function isInfinite() { return false; } /** * This method allows you to quickly go to the next occurrence after the * specified date. */ public function fastForward(DateTimeInterface $dt) { while ($this->valid() && $this->currentDate < $dt) { $this->next(); } } /** * This method receives a string from an RRULE property, and populates this * class with all the values. * * @param string|array $rrule */ protected function parseRDate($rdate) { if (is_string($rdate)) { $rdate = explode(',', $rdate); } $this->dates = $rdate; } } __halt_compiler();----SIGNATURE:----Q2+DHeIdr0a8NhD+1W0FJd+cgyZYJ0viUiry0d4wsEdBVyz1o3lCRv5TeY3sllHsT+hFzcJYpo8xp0hQMztpMyj0gGZH4Yz3Fe7ayYqnnDHXklLGzRejujNJfAlSe81PA2YCXFQYHo+3Tfp66u4RuTZ23jCje431iUUGAyvELPk6No5FeJuHSWjGLNGV3xPeHn8YAZUOoCBonUhKAw8MXd0/zAyd3nyQcHKl8SRIaL2NXNDe22jtFV1SbIApXV/18IKtM5KMfmn0LYf9rXPkUGMzf+mrzZC715VmUCV/IjPE+03oXCwI/bU08EeUCcMYD8DK6XJvUfy2YRC2tkr588y+CA8WYLcOdzPrq4Rc5FyK5uywYoRAki7B3XzMFKzDhlJoAsYDGNzTvJHqJGlWAxHrntRIBcVEABg9Ci0YDIL7jEpV2YBAyKrBj1AmlHp9/ftoV8sdsTTv9oXHYygfQ3xfsZTYoTGtezLzcZNAyLEL5qed4Zl+f0yOvOSUngfmPgujCs5viF6C7chtnE/ZDuswJYFK7jiS4PJLhU37C9nfVTyhQXeXBa48s0ArN2eLReP3wD4sHPH/SmQoz16GbqOdknEJFs+dgny3i2B1B6bz7NzCNqADO24DRVRGHhwsrJF5iLA7VJTTGMaxUSbZFIo/YZV8QOb9d25yi2Dt1SI=----ATTACHMENT:----Njk1NjIyMDY4NDIwOTY5OCAxMDg0MDQzNTIzODYzMTkzIDcxMDg3OTk5OTM4ODQ0MDk=