The ArrayObject class

(PHP 5, PHP 7)

简介

This class allows objects to work as arrays.

类摘要

ArrayObject implements IteratorAggregate , ArrayAccess , Serializable , Countable {
/* 常量 */
const int STD_PROP_LIST = 1 ;
const int ARRAY_AS_PROPS = 2 ;
/* 方法 */
public __construct ( mixed $input = array() , int $flags = 0 , string $iterator_class = "ArrayIterator" )
public append ( mixed $value ) : void
public asort ( int $flags = SORT_REGULAR ) : void
public count ( ) : int
public exchangeArray ( mixed $input ) : array
public getArrayCopy ( ) : array
public getFlags ( ) : int
public getIteratorClass ( ) : string
public ksort ( int $flags = SORT_REGULAR ) : void
public natcasesort ( ) : void
public natsort ( ) : void
public offsetExists ( mixed $index ) : bool
public offsetGet ( mixed $index ) : mixed
public offsetSet ( mixed $index , mixed $newval ) : void
public offsetUnset ( mixed $index ) : void
public serialize ( ) : string
public setFlags ( int $flags ) : void
public setIteratorClass ( string $iterator_class ) : void
public uasort ( callable $cmp_function ) : void
public uksort ( callable $cmp_function ) : void
public unserialize ( string $serialized ) : void
}

预定义常量

ArrayObject Flags

ArrayObject::STD_PROP_LIST

Properties of the object have their normal functionality when accessed as list (var_dump, foreach, etc.).

ArrayObject::ARRAY_AS_PROPS

Entries can be accessed as properties (read and write).

目录