ArrayObject
class ArrayObject implements IteratorAggregate, ArrayAccess, Serializable, Countable (View source)
The ArrayObject class. Based on ZF2.
Constants
STD_PROP_LIST |
Properties of the object have their normal functionality when accessed as list (var_dump, foreach, etc.). |
ARRAY_AS_PROPS |
Entries can be accessed as properties (read and write). |
Methods
Constructor
Returns whether the requested key exists
Sets the value at the specified key to value
Unsets the value at the specified key
Returns the value at the specified key by reference
Appends the value
Sort the entries by value
Get the number of public properties in the ArrayObject
Creates a copy of the ArrayObject.
Gets the behavior flags.
Create a new iterator from an ArrayObject instance
Gets the iterator classname for the ArrayObject.
Sort the entries by key
Sort an array using a case insensitive "natural order" algorithm
Sort entries using a "natural order" algorithm
Returns whether the requested key exists
Returns the value at the specified key
Sets the value at the specified key to value
Unsets the value at the specified key
Serialize an ArrayObject
Sets the behavior flags
Sets the iterator classname for the ArrayObject
Sort the entries with a user-defined comparison function and maintain key association
Sort the entries by keys using a user-defined comparison function
Unserialize an ArrayObject
Details
at line line 56
__construct(array $input = array(), int $flags = self::STD_PROP_LIST, string $iteratorClass = 'ArrayIterator')
Constructor
at line line 72
boolean
__isset(mixed $key)
Returns whether the requested key exists
at line line 96
void|mixed
__set(mixed $key, mixed $value)
Sets the value at the specified key to value
at line line 121
void|mixed
__unset(mixed $key)
Unsets the value at the specified key
at line line 146
mixed
__get(mixed $key)
Returns the value at the specified key by reference
at line line 172
void
append(mixed $value)
Appends the value
at line line 182
void
asort()
Sort the entries by value
at line line 192
int
count()
Get the number of public properties in the ArrayObject
at line line 205
array
exchangeArray(array|ArrayObject $data)
Exchange the array for another one.
at line line 234
array
getArrayCopy()
Creates a copy of the ArrayObject.
at line line 244
int
getFlags()
Gets the behavior flags.
at line line 266
string
getIteratorClass()
Gets the iterator classname for the ArrayObject.
at line line 276
void
ksort()
Sort the entries by key
at line line 286
void
natcasesort()
Sort an array using a case insensitive "natural order" algorithm
at line line 296
void
natsort()
Sort entries using a "natural order" algorithm
at line line 308
bool
offsetExists(mixed $key)
Returns whether the requested key exists
at line line 320
mixed
offsetGet(mixed $key)
Returns the value at the specified key
at line line 342
void
offsetSet(mixed $key, mixed $value)
Sets the value at the specified key to value
at line line 354
void
offsetUnset(mixed $key)
Unsets the value at the specified key
at line line 367
string
serialize()
Serialize an ArrayObject
at line line 379
void
setFlags(int $flags)
Sets the behavior flags
at line line 392
void
setIteratorClass(string $class)
Sets the iterator classname for the ArrayObject
at line line 423
void
uasort(callable $function)
Sort the entries with a user-defined comparison function and maintain key association
at line line 438
void
uksort(callable $function)
Sort the entries by keys using a user-defined comparison function
at line line 453
void
unserialize(string $data)
Unserialize an ArrayObject