BlueSpice MediaWiki master
 All Classes Namespaces Files Functions Variables Groups Pages
ArrayIterator Class Reference
Inheritance diagram for ArrayIterator:
Collaboration diagram for ArrayIterator:

Public Member Functions

 __construct ($array=array(), $flags=0)
 
 offsetExists ($index)
 
 offsetGet ($index)
 
 offsetSet ($index, $newval)
 
 offsetUnset ($index)
 
 append ($value)
 
 getArrayCopy ()
 
 count ()
 
 getFlags ()
 
 setFlags ($flags)
 
 asort ()
 
 ksort ()
 
 uasort ($cmp_function)
 
 uksort ($cmp_function)
 
 natsort ()
 
 natcasesort ()
 
 unserialize ($serialized)
 
 serialize ()
 
 rewind ()
 
 current ()
 
 key ()
 
 next ()
 
 valid ()
 
 seek ($position)
 

Public Attributes

const STD_PROP_LIST = 1
 
const ARRAY_AS_PROPS = 2
 

Detailed Description

This iterator allows to unset and modify values and keys while iterating over Arrays and Objects. http://php.net/manual/en/class.arrayiterator.php

Constructor & Destructor Documentation

Member Function Documentation

ArrayIterator::append (   $value)

Append an element mixed $value The value to append.

Returns
void
Since
5.0.0
ArrayIterator::asort ( )

Sort array by values void 5.2.0

ArrayIterator::current ( )

Return current array entry mixed The current array entry. 5.0.0

Implements Iterator.

ArrayIterator::getFlags ( )
ArrayIterator::key ( )

Return current array key mixed The current array key. 5.0.0

Implements Iterator.

ArrayIterator::ksort ( )

Sort array by keys void 5.2.0

ArrayIterator::natcasesort ( )

Sort an array naturally, case insensitive void 5.2.0

ArrayIterator::natsort ( )

Sort an array naturally void 5.2.0

ArrayIterator::next ( )

Move to next entry void 5.0.0

Implements Iterator.

ArrayIterator::offsetExists (   $index)

Check if offset exists string $index The offset being checked.

Returns
bool true if the offset exists, otherwise false
Since
5.0.0

Implements ArrayAccess.

ArrayIterator::offsetGet (   $index)

Get value for an offset string $index The offset to get the value from.

Returns
mixed The value at offset index.
Since
5.0.0

Implements ArrayAccess.

ArrayIterator::offsetSet (   $index,
  $newval 
)

Set value for an offset string $index The index to set for.

Parameters
string$newval

The new value to store at the index.

Returns
void
Since
5.0.0

Implements ArrayAccess.

ArrayIterator::offsetUnset (   $index)

Unset value for an offset string $index The offset to unset.

Returns
void
Since
5.0.0

Implements ArrayAccess.

ArrayIterator::rewind ( )

Rewind array back to the start void 5.0.0

Implements Iterator.

ArrayIterator::seek (   $position)

Seek to position int $position The position to seek to.

Returns
void
Since
5.0.0

Implements SeekableIterator.

ArrayIterator::serialize ( )
ArrayIterator::setFlags (   $flags)

Set behaviour flags string $flags A bitmask as follows: 0 = Properties of the object have their normal functionality when accessed as list (var_dump, foreach, etc.). 1 = Array indices can be accessed as properties in read/write.

Returns
void
Since
5.1.0
ArrayIterator::uasort (   $cmp_function)

User defined sort string $cmp_function The compare function used for the sort.

Returns
void
Since
5.2.0
ArrayIterator::uksort (   $cmp_function)

User defined sort string $cmp_function The compare function used for the sort.

Returns
void
Since
5.2.0
ArrayIterator::unserialize (   $serialized)

Unserialize string $serialized The serialized ArrayIterator object to be unserialized.

Returns
string The ArrayIterator.
Since
5.3.0

Implements Serializable.

ArrayIterator::valid ( )

Check whether array contains more entries bool 5.0.0

Implements Iterator.


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