Zend Framework  3.0
Public Member Functions | Protected Attributes | List of all members
ItemList Class Reference

Public Member Functions

 count ()
 Count all items.
 
 spreadWeightValues (array $values)
 Spread values in the items relative to their weight.
 
 seek ($index)
 Seek to an absolute position.
 
 current ()
 Return the current element.
 
 next ()
 Move forward to next element.
 
 key ()
 Return the key of the current element.
 
 valid ()
 Check if there is a current element after calls to rewind() or next()
 
 rewind ()
 Rewind the Iterator to the first element.
 
 offsetExists ($offset)
 Check if an offset exists.
 
 offsetGet ($offset)
 Get the value of an offset.
 
 offsetSet ($offset, $item)
 Append a new item.
 
 offsetUnset ($offset)
 Unset an item.
 

Protected Attributes

 $items = []
 

Member Function Documentation

count ( )

Count all items.

Returns
int
current ( )

Return the current element.

Returns
mixed
key ( )

Return the key of the current element.

Returns
mixed
next ( )

Move forward to next element.

Returns
mixed
offsetExists (   $offset)

Check if an offset exists.

Parameters
mixed$offset
Returns
bool
offsetGet (   $offset)

Get the value of an offset.

Parameters
mixed$offset
Returns
TaggableInterface
offsetSet (   $offset,
  $item 
)

Append a new item.

Parameters
mixed$offset
TaggableInterface$item
Exceptions
OutOfBoundsExceptionWhen item does not implement Zend
Returns
void
offsetUnset (   $offset)

Unset an item.

Parameters
mixed$offset
Returns
void
rewind ( )

Rewind the Iterator to the first element.

Returns
void
seek (   $index)

Seek to an absolute position.

Parameters
int$index
Exceptions
OutOfBoundsExceptionWhen the seek position is invalid
Returns
void
spreadWeightValues ( array  $values)

Spread values in the items relative to their weight.

Parameters
array$values
Exceptions
InvalidArgumentExceptionWhen value list is empty
Returns
void
valid ( )

Check if there is a current element after calls to rewind() or next()

Returns
bool

Member Data Documentation

$items = []
protected