その他のクラスおよびインターフェイス
PHP Manual

ArrayObject クラス

(PHP 5)

導入

このクラスは、オブジェクトを配列として動作させます。

クラス概要

/* 定数 */
const integer STD_PROP_LIST = 1 ;
const integer ARRAY_AS_PROPS = 2 ;
/* メソッド */
public __construct ([ mixed $input [, int $flags [, string $iterator_class ]]] )
public void append ( mixed $value )
public void asort ( void )
public int count ( void )
public array exchangeArray ( mixed $input )
public array getArrayCopy ( void )
public int getFlags ( void )
public ArrayIterator getIterator ( void )
public string getIteratorClass ( void )
public void ksort ( void )
public void natcasesort ( void )
public void natsort ( void )
public bool offsetExists ( mixed $index )
public mixed offsetGet ( mixed $index )
public void offsetSet ( mixed $index , mixed $newval )
public void offsetUnset ( mixed $index )
public void serialize ( void )
public void setFlags ( int $flags )
public void setIteratorClass ( string $iterator_class )
public void uasort ( callable $cmp_function )
public void uksort ( callable $cmp_function )
public void unserialize ( string $serialized )
}

定義済み定数

ArrayObject の定数

ArrayObject::STD_PROP_LIST

オブジェクトのプロパティは (var_dump, foreachなどで) 配列としてアクセスしたときと同じ機能を持ちます

ArrayObject::ARRAY_AS_PROPS

オブジェクトのエントリはプロパティとしてアクセスできます(読み書き可)

変更履歴

バージョン 説明
5.3.0 Serializable を実装しました。

目次


その他のクラスおよびインターフェイス
PHP Manual