Zend Framework  2.4
Public Member Functions | Public Attributes | Protected Attributes | List of all members
ArrayObject Class Reference

Custom framework ArrayObject implementation. More...

Public Member Functions

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

Public Attributes

const STD_PROP_LIST = 1
 Properties of the object have their normal functionality when accessed as list (var_dump, foreach, etc.).
 
const ARRAY_AS_PROPS = 2
 Entries can be accessed as properties (read and write).
 

Protected Attributes

 $storage
 
 $flag
 
 $iteratorClass
 
 $protectedProperties
 

Detailed Description

Custom framework ArrayObject implementation.

Extends version-specific "abstract" implementation.

Constructor & Destructor Documentation

__construct (   $input = array(),
  $flags = self::STD_PROP_LIST,
  $iteratorClass = 'ArrayIterator' 
)

Constructor.

Parameters
array$input
int$flags
string$iteratorClass

Member Function Documentation

& __get (   $key)

Returns the value at the specified key by reference.

Parameters
mixed$key
Returns
mixed
__isset (   $key)

Returns whether the requested key exists.

Parameters
mixed$key
Returns
bool
__set (   $key,
  $value 
)

Sets the value at the specified key to value.

Parameters
mixed$key
mixed$value
Returns
void
__unset (   $key)

Unsets the value at the specified key.

Parameters
mixed$key
Returns
void
append (   $value)

Appends the value.

Parameters
mixed$value
Returns
void
asort ( )

Sort the entries by value.

Returns
void
count ( )

Get the number of public properties in the ArrayObject.

Returns
int
exchangeArray (   $data)

Exchange the array for another one.

Parameters
array | ArrayObject$data
Returns
array
getArrayCopy ( )

Creates a copy of the ArrayObject.

Returns
array
getFlags ( )

Gets the behavior flags.

Returns
int
getIterator ( )

Create a new iterator from an ArrayObject instance.

Returns
getIteratorClass ( )

Gets the iterator classname for the ArrayObject.

Returns
string
ksort ( )

Sort the entries by key.

Returns
void
natcasesort ( )

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

Returns
void
natsort ( )

Sort entries using a "natural order" algorithm.

Returns
void
offsetExists (   $key)

Returns whether the requested key exists.

Parameters
mixed$key
Returns
bool
& offsetGet (   $key)

Returns the value at the specified key.

Parameters
mixed$key
Returns
mixed
offsetSet (   $key,
  $value 
)

Sets the value at the specified key to value.

Parameters
mixed$key
mixed$value
Returns
void
offsetUnset (   $key)

Unsets the value at the specified key.

Parameters
mixed$key
Returns
void
serialize ( )

Serialize an ArrayObject.

Returns
string
setFlags (   $flags)

Sets the behavior flags.

Parameters
int$flags
Returns
void
setIteratorClass (   $class)

Sets the iterator classname for the ArrayObject.

Parameters
string$class
Returns
void
uasort (   $function)

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

Parameters
callable$function
Returns
void
uksort (   $function)

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

Parameters
callable$function
Returns
void
unserialize (   $data)

Unserialize an ArrayObject.

Parameters
string$data
Returns
void

Member Data Documentation

$flag
protected
$iteratorClass
protected
$protectedProperties
protected
$storage
protected
const ARRAY_AS_PROPS = 2

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

const STD_PROP_LIST = 1

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