イテレータ
PHP Manual

ArrayIterator クラス

(PHP 5)

導入

このイテレータは、配列やオブジェクトを反復処理する際に 値やキーをリセットしたり修正したりすることができます。

同じ配列を何度も反復処理したい場合は、 ArrayObject のインスタンスとそれを参照する ArrayIterator のインスタンスを作成し、 foreach を使用するか getIterator() メソッドを手動でコールします。

クラス概要

/* メソッド */
public void append ( mixed $value )
public void asort ( void )
public __construct ( mixed $array )
public int count ( void )
public mixed current ( void )
public array getArrayCopy ( void )
public void getFlags ( void )
public mixed key ( void )
public void ksort ( void )
public void natcasesort ( void )
public void natsort ( void )
public void next ( void )
public void offsetExists ( string $index )
public mixed offsetGet ( string $index )
public void offsetSet ( string $index , string $newval )
public void offsetUnset ( string $index )
public void rewind ( void )
public void seek ( int $position )
public string serialize ( void )
public void setFlags ( string $flags )
public void uasort ( string $cmp_function )
public void uksort ( string $cmp_function )
public string unserialize ( string $serialized )
public bool valid ( void )
}

目次


イテレータ
PHP Manual