\duncan3dc\Dates\IteratorAbstractIterator

An abstract class for creating iterators from a range of dates.

Summary

Methods
Properties
Constants
__construct()
current()
key()
next()
rewind()
valid()
count()
No public properties found
No constants found
increment()
$start
$end
$position
$date
$count
N/A
No private methods found
No private properties found
N/A

Properties

$start

$start : integer

Type

integer — The unix timestamp for the start date of the range

$end

$end : integer

Type

integer — The unix timestamp for the end date of the range

$position

$position : integer

Type

integer — The current position in the iterator

$date

$date : \duncan3dc\Dates\DateTime

Type

\duncan3dc\Dates\DateTime — The date object for the current iterator position

$count

$count : integer|null

Type

integer|null — The number of elements in the iterator

Methods

__construct()

__construct(\duncan3dc\Dates\DateTime  $start, \duncan3dc\Dates\DateTime  $end) 

Create a new iterator for a range.

Parameters

\duncan3dc\Dates\DateTime $start

The start date of the range

\duncan3dc\Dates\DateTime $end

The end date of the range

key()

key() : integer

Get the current iterator position.

Returns

integer

next()

next() : void

Advance the iterator to the next position.

rewind()

rewind() : void

Reset the iterator to the start.

valid()

valid() : boolean

Check if the current position is valid.

Returns

boolean

count()

count() : integer

Get the number of elements in the iterator.

Returns

integer

increment()

increment() : void

Increment the internal date to the next position in the range.