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 119
void|mixed
__unset(mixed $key)
Unsets the value at the specified key
at line line 142
mixed
__get(mixed $key)
Returns the value at the specified key by reference
at line line 168
void
append(mixed $value)
Appends the value
at line line 178
void
asort()
Sort the entries by value
at line line 188
int
count()
Get the number of public properties in the ArrayObject
at line line 201
array
exchangeArray(array|ArrayObject $data)
Exchange the array for another one.
at line line 230
array
getArrayCopy()
Creates a copy of the ArrayObject.
at line line 240
int
getFlags()
Gets the behavior flags.
at line line 262
string
getIteratorClass()
Gets the iterator classname for the ArrayObject.
at line line 272
void
ksort()
Sort the entries by key
at line line 282
void
natcasesort()
Sort an array using a case insensitive "natural order" algorithm
at line line 292
void
natsort()
Sort entries using a "natural order" algorithm
at line line 304
bool
offsetExists(mixed $key)
Returns whether the requested key exists
at line line 316
mixed
offsetGet(mixed $key)
Returns the value at the specified key
at line line 338
void
offsetSet(mixed $key, mixed $value)
Sets the value at the specified key to value
at line line 350
void
offsetUnset(mixed $key)
Unsets the value at the specified key
at line line 363
string
serialize()
Serialize an ArrayObject
at line line 375
void
setFlags(int $flags)
Sets the behavior flags
at line line 388
void
setIteratorClass(string $class)
Sets the iterator classname for the ArrayObject
at line line 419
void
uasort(callable $function)
Sort the entries with a user-defined comparison function and maintain key association
at line line 434
void
uksort(callable $function)
Sort the entries by keys using a user-defined comparison function
at line line 449
void
unserialize(string $data)
Unserialize an ArrayObject