SPL
PHP Manual

The ArrayObject class

简介

This class allows objects to work as arrays.

类摘要

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

预定义常量

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).

更新日志

版本 说明
5.3.0 Implements Serializable.

Table of Contents


SPL
PHP Manual