Class Zend\Stdlib\ArrayObject

InheritanceZend\Stdlib\ArrayObject
ImplementsArrayAccess, Countable, IteratorAggregate, Serializable

PHP 7.3 modified variant of ZF2 Array Object

Custom framework ArrayObject implementation

Extends version-specific "abstract" implementation.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__construct() Constructor Zend\Stdlib\ArrayObject
__get() Returns the value at the specified key by reference Zend\Stdlib\ArrayObject
__isset() Returns whether the requested key exists Zend\Stdlib\ArrayObject
__set() Sets the value at the specified key to value Zend\Stdlib\ArrayObject
__unset() Unsets the value at the specified key Zend\Stdlib\ArrayObject
append() Appends the value Zend\Stdlib\ArrayObject
asort() Sort the entries by value Zend\Stdlib\ArrayObject
count() Get the number of public properties in the ArrayObject Zend\Stdlib\ArrayObject
exchangeArray() Exchange the array for another one. Zend\Stdlib\ArrayObject
getArrayCopy() Creates a copy of the ArrayObject. Zend\Stdlib\ArrayObject
getFlags() Gets the behavior flags. Zend\Stdlib\ArrayObject
getIterator() Create a new iterator from an ArrayObject instance Zend\Stdlib\ArrayObject
getIteratorClass() Gets the iterator classname for the ArrayObject. Zend\Stdlib\ArrayObject
ksort() Sort the entries by key Zend\Stdlib\ArrayObject
natcasesort() Sort an array using a case insensitive "natural order" algorithm Zend\Stdlib\ArrayObject
natsort() Sort entries using a "natural order" algorithm Zend\Stdlib\ArrayObject
offsetExists() Returns whether the requested key exists Zend\Stdlib\ArrayObject
offsetGet() Returns the value at the specified key Zend\Stdlib\ArrayObject
offsetSet() Sets the value at the specified key to value Zend\Stdlib\ArrayObject
offsetUnset() Unsets the value at the specified key Zend\Stdlib\ArrayObject
serialize() Serialize an ArrayObject Zend\Stdlib\ArrayObject
setFlags() Sets the behavior flags Zend\Stdlib\ArrayObject
setIteratorClass() Sets the iterator classname for the ArrayObject Zend\Stdlib\ArrayObject
uasort() Sort the entries with a user-defined comparison function and maintain key association Zend\Stdlib\ArrayObject
uksort() Sort the entries by keys using a user-defined comparison function Zend\Stdlib\ArrayObject
unserialize() Unserialize an ArrayObject Zend\Stdlib\ArrayObject

Constants

Hide inherited constants

ConstantValueDescriptionDefined By
ARRAY_AS_PROPS 2 Entries can be accessed as properties (read and write). Zend\Stdlib\ArrayObject
STD_PROP_LIST 1 Properties of the object have their normal functionality when accessed as list (var_dump, foreach, etc.). Zend\Stdlib\ArrayObject

Property Details

$flag protected property
protected integer $flag null
$iteratorClass protected property
protected string $iteratorClass null
$protectedProperties protected property
protected array $protectedProperties null
$storage protected property
protected array $storage null

Method Details

__construct() public method

Constructor

public void __construct ( $input = [], $flags self::STD_PROP_LIST, $iteratorClass 'ArrayIterator' )
$input array
$flags integer
$iteratorClass string
__get() public method

Returns the value at the specified key by reference

public &mixed __get ( $key )
$key mixed
__isset() public method

Returns whether the requested key exists

public boolean __isset ( $key )
$key mixed
__set() public method

Sets the value at the specified key to value

public void __set ( $key, $value )
$key mixed
$value mixed
__unset() public method

Unsets the value at the specified key

public void __unset ( $key )
$key mixed
append() public method

Appends the value

public void append ( $value )
$value mixed
asort() public method

Sort the entries by value

public void asort ( )
count() public method

Get the number of public properties in the ArrayObject

public integer count ( )
exchangeArray() public method

Exchange the array for another one.

public array exchangeArray ( $data )
$data array|Zend\Stdlib\ArrayObject
getArrayCopy() public method

Creates a copy of the ArrayObject.

public array getArrayCopy ( )
getFlags() public method

Gets the behavior flags.

public integer getFlags ( )
getIterator() public method

Create a new iterator from an ArrayObject instance

public Iterator getIterator ( )
getIteratorClass() public method

Gets the iterator classname for the ArrayObject.

public string getIteratorClass ( )
ksort() public method

Sort the entries by key

public void ksort ( )
natcasesort() public method

Sort an array using a case insensitive "natural order" algorithm

public void natcasesort ( )
natsort() public method

Sort entries using a "natural order" algorithm

public void natsort ( )
offsetExists() public method

Returns whether the requested key exists

public boolean offsetExists ( $key )
$key mixed
offsetGet() public method

Returns the value at the specified key

public &mixed offsetGet ( $key )
$key mixed
offsetSet() public method

Sets the value at the specified key to value

public void offsetSet ( $key, $value )
$key mixed
$value mixed
offsetUnset() public method

Unsets the value at the specified key

public void offsetUnset ( $key )
$key mixed
serialize() public method

Serialize an ArrayObject

public string serialize ( )
setFlags() public method

Sets the behavior flags

public void setFlags ( $flags )
$flags integer
setIteratorClass() public method

Sets the iterator classname for the ArrayObject

public void setIteratorClass ( $class )
$class string
uasort() public method

Sort the entries with a user-defined comparison function and maintain key association

public void uasort ( $function )
$function callable
uksort() public method

Sort the entries by keys using a user-defined comparison function

public void uksort ( $function )
$function callable
unserialize() public method

Unserialize an ArrayObject

public void unserialize ( $data )
$data string