Stud.IP  5.4
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)
 
 contains ($value)
 

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()

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

Constructor

Parameters
array$input
int$flags
string$iteratorClass

Member Function Documentation

◆ __get()

__get (   $key)

Returns the value at the specified key

Parameters
mixed$key
Returns
mixed

◆ __isset()

__isset (   $key)

Returns whether the requested key exists

Parameters
mixed$key
Returns
bool

◆ __set()

__set (   $key,
  $value 
)

Sets the value at the specified key to value

Parameters
mixed$key
mixed$value
Returns
void

◆ __unset()

__unset (   $key)

Unsets the value at the specified key

Parameters
mixed$key
Returns
void

◆ append()

append (   $value)

Appends the value

Parameters
mixed$value
Returns
void

◆ asort()

asort ( )

Sort the entries by value

Returns
void

◆ contains()

contains (   $value)

Returns whether the given value is in the underlying array.

◆ count()

count ( )

Get the number of public properties in the ArrayObject

Returns
int

◆ exchangeArray()

exchangeArray (   $data)

Exchange the array for another one.

Parameters
array | ArrayObject$data
Returns
array

◆ getArrayCopy()

getArrayCopy ( )

Creates a copy of the ArrayObject.

Returns
array

◆ getFlags()

getFlags ( )

Gets the behavior flags.

Returns
int

◆ getIterator()

getIterator ( )

Create a new iterator from an ArrayObject instance

Returns

◆ getIteratorClass()

getIteratorClass ( )

Gets the iterator classname for the ArrayObject.

Returns
string

◆ ksort()

ksort ( )

Sort the entries by key

Returns
void

◆ natcasesort()

natcasesort ( )

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

Returns
void

◆ natsort()

natsort ( )

Sort entries using a "natural order" algorithm

Returns
void

◆ offsetExists()

offsetExists (   $key)

Returns whether the requested key exists

Parameters
mixed$key
Returns
bool

◆ offsetGet()

offsetGet (   $key)

Returns the value at the specified key

Parameters
mixed$key
Returns
mixed

◆ offsetSet()

offsetSet (   $key,
  $value 
)

Sets the value at the specified key to value

Parameters
mixed$key
mixed$value
Returns
void

◆ offsetUnset()

offsetUnset (   $key)

Unsets the value at the specified key

Parameters
mixed$key
Returns
void

◆ serialize()

serialize ( )

Serialize an ArrayObject

Returns
string

◆ setFlags()

setFlags (   $flags)

Sets the behavior flags

Parameters
int$flags
Returns
void

◆ setIteratorClass()

setIteratorClass (   $class)

Sets the iterator classname for the ArrayObject

Parameters
string$class
Returns
void

◆ uasort()

uasort (   $function)

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

Parameters
callable$function
Returns
void

◆ uksort()

uksort (   $function)

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

Parameters
callable$function
Returns
void

◆ unserialize()

unserialize (   $data)

Unserialize an ArrayObject

Parameters
string$data
Returns
void

◆ validateKeyUsage()

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

$flag
protected

◆ $iteratorClass

$iteratorClass
protected

◆ $protectedProperties

$protectedProperties
protected

◆ $storage

$storage
protected

◆ ARRAY_AS_PROPS

const ARRAY_AS_PROPS = 2

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

◆ STD_PROP_LIST

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: