Stud.IP  4.0
 All Data Structures Namespaces Files Functions Variables Groups
StudipArrayObject Class Reference
Inheritance diagram for StudipArrayObject:
CSVArrayObject MultiDimArrayObject SimpleCollection JSONArrayObject SimpleORMapCollection OpenGraphURLCollection

Public Member Functions

 __construct ($input=[], $flags=self::STD_PROP_LIST, $iteratorClass= 'ArrayIterator')
 
 __isset ($key)
 
 __set ($key, $value)
 
 __unset ($key)
 
 __get ($key)
 
 append ($value)
 
 asort ()
 
 count ()
 
 exchangeArray ($data)
 
 getArrayCopy ()
 
 getFlags ()
 
 getIterator ()
 
 getIteratorClass ()
 
 ksort ()
 
 natcasesort ()
 
 natsort ()
 
 offsetExists ($key)
 
 offsetGet ($key)
 
 offsetSet ($key, $value)
 
 offsetUnset ($key)
 
 serialize ()
 
 setFlags ($flags)
 
 setIteratorClass ($class)
 
 uasort ($function)
 
 uksort ($function)
 
 unserialize ($data)
 

Data Fields

const STD_PROP_LIST = 1
 
const ARRAY_AS_PROPS = 2
 

Protected Member Functions

 validateKeyUsage ($key)
 

Protected Attributes

 $storage
 
 $flag
 
 $iteratorClass
 
 $protectedProperties
 

Detailed Description

StudipArrayObject

This ArrayObject is a rewrite of the implementation to fix issues with php's implementation of ArrayObject regarding cyclic references based on Zend

Author
André Noack noack.nosp@m.@dat.nosp@m.a-que.nosp@m.st.d.nosp@m.e

Zend Framework (http://framework.zend.com/)

for the canonical source repository Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) http://framework.zend.com/license/new-bsd New BSD License

Constructor & Destructor Documentation

__construct (   $input = [],
  $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

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
validateKeyUsage (   $key)
protected

Validates whether the given key is a protected property.

Parameters
string$keyThe key to validate
Exceptions
InvalidArgumentExceptionwhen key is invalid

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


The documentation for this class was generated from the following file: