MediaWiki  1.28.0
ReverseArrayIterator Class Reference

Convenience class for iterating over an array in reverse order. More...

Inheritance diagram for ReverseArrayIterator:
Collaboration diagram for ReverseArrayIterator:

Public Member Functions

 __construct ($array=[])
 Creates an iterator which will visit the keys in $array in reverse order. More...
 
 count ()
 
 current ()
 
 key ()
 
 next ()
 
 rewind ()
 
 valid ()
 

Protected Attributes

 $array
 

Detailed Description

Convenience class for iterating over an array in reverse order.

Since
1.27

Definition at line 29 of file ReverseArrayIterator.php.

Constructor & Destructor Documentation

ReverseArrayIterator::__construct (   $array = [])

Creates an iterator which will visit the keys in $array in reverse order.

If given an object, will visit the properties of the object in reverse order. (Note that the default order for PHP arrays and objects is declaration/assignment order.)

Parameters
array | object$array

Definition at line 41 of file ReverseArrayIterator.php.

References $array, array(), and rewind().

Member Function Documentation

ReverseArrayIterator::count ( )

Definition at line 73 of file ReverseArrayIterator.php.

References array().

ReverseArrayIterator::current ( )

Definition at line 53 of file ReverseArrayIterator.php.

References array().

ReverseArrayIterator::key ( )

Definition at line 57 of file ReverseArrayIterator.php.

References array().

Referenced by valid().

ReverseArrayIterator::next ( )

Definition at line 61 of file ReverseArrayIterator.php.

References array().

ReverseArrayIterator::rewind ( )

Definition at line 65 of file ReverseArrayIterator.php.

References array().

Referenced by __construct().

ReverseArrayIterator::valid ( )

Definition at line 69 of file ReverseArrayIterator.php.

References array(), and key().

Member Data Documentation

ReverseArrayIterator::$array
protected

Definition at line 31 of file ReverseArrayIterator.php.

Referenced by __construct().


The documentation for this class was generated from the following file: