MediaWiki REL1_39
ExplodeIterator Class Reference

An iterator which works exactly like: More...

Inheritance diagram for ExplodeIterator:
Collaboration diagram for ExplodeIterator:

Public Member Functions

 __construct ( $delim, $subject)
 Construct a DelimIterator.
 
 current ()
 
 key ()
 
 next ()
 
 refreshCurrent ()
 
 rewind ()
 
 valid ()
 

Detailed Description

An iterator which works exactly like:

foreach ( explode( $delim, $s ) as $element ) { ... }

Except it doesn't use 193 byte per element

Definition at line 30 of file ExplodeIterator.php.

Constructor & Destructor Documentation

◆ __construct()

ExplodeIterator::__construct ( $delim,
$subject )

Construct a DelimIterator.

Parameters
string$delim
string$subject

Definition at line 57 of file ExplodeIterator.php.

References rewind().

Member Function Documentation

◆ current()

ExplodeIterator::current ( )
Returns
string|false

Definition at line 90 of file ExplodeIterator.php.

◆ key()

ExplodeIterator::key ( )
Returns
int|false Current position or boolean false if invalid

Definition at line 98 of file ExplodeIterator.php.

◆ next()

ExplodeIterator::next ( )
Returns
void

Definition at line 105 of file ExplodeIterator.php.

◆ refreshCurrent()

ExplodeIterator::refreshCurrent ( )

Definition at line 74 of file ExplodeIterator.php.

◆ rewind()

ExplodeIterator::rewind ( )

Definition at line 68 of file ExplodeIterator.php.

Referenced by __construct().

◆ valid()

ExplodeIterator::valid ( )
Returns
bool

Definition at line 122 of file ExplodeIterator.php.


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