BlueSpice MediaWiki master
 All Classes Namespaces Files Functions Variables Groups Pages
GenericArrayObject Class Reference
Inheritance diagram for GenericArrayObject:
Collaboration diagram for GenericArrayObject:

Public Member Functions

 getObjectType ()
 
 __construct ($input=null, $flags=0, $iterator_class= 'ArrayIterator')
 
 append ($value)
 
 offsetSet ($index, $value)
 
 serialize ()
 
 unserialize ($serialization)
 
 isEmpty ()
 
- Public Member Functions inherited from ArrayObject
 __construct ($input=null, $flags=0, $iterator_class="ArrayIterator")
 
 offsetExists ($index)
 
 offsetGet ($index)
 
 offsetSet ($index, $newval)
 
 offsetUnset ($index)
 
 append ($value)
 
 getArrayCopy ()
 
 count ()
 
 getFlags ()
 
 setFlags ($flags)
 
 asort ()
 
 ksort ()
 
 uasort ($cmp_function)
 
 uksort ($cmp_function)
 
 natsort ()
 
 natcasesort ()
 
 unserialize ($serialized)
 
 serialize ()
 
 getIterator ()
 
 exchangeArray ($input)
 
 setIteratorClass ($iterator_class)
 
 getIteratorClass ()
 

Protected Member Functions

 getNewOffset ()
 
 hasValidType ($value)
 
 setElement ($index, $value)
 
 preSetElement ($index, $value)
 
 getSerializationData ()
 

Protected Attributes

 $indexOffset = 0
 

Additional Inherited Members

- Public Attributes inherited from ArrayObject
const STD_PROP_LIST = 1
 
const ARRAY_AS_PROPS = 2
 

Constructor & Destructor Documentation

GenericArrayObject::__construct (   $input = null,
  $flags = 0,
  $iterator_class = 'ArrayIterator' 
)
See Also
ArrayObject::__construct
Since
1.20
Parameters
null | array$input
int$flags
string$iterator_class

Member Function Documentation

GenericArrayObject::append (   $value)
See Also
ArrayObject::append
Since
1.20
Parameters
mixed$value
GenericArrayObject::getNewOffset ( )
protected

Finds a new offset for when appending an element. The base class does this, so it would be better to integrate, but there does not appear to be any way to do this...

Since
1.20
Returns
int
GenericArrayObject::getObjectType ( )
abstract

Returns the name of an interface/class that the element should implement/extend.

Since
1.20
Returns
string
GenericArrayObject::getSerializationData ( )
protected

Returns an array holding all the data that should go into serialization calls. This is intended to allow overloading without having to reimplement the behavior of this base class.

Since
1.20
Returns
array
GenericArrayObject::hasValidType (   $value)
protected

Returns if the provided value has the same type as the elements that can be added to this ArrayObject.

Since
1.20
Parameters
mixed$value
Returns
bool
GenericArrayObject::isEmpty ( )

Returns if the ArrayObject has no elements.

Since
1.20
Returns
bool
GenericArrayObject::offsetSet (   $index,
  $value 
)
See Also
ArrayObject::offsetSet()
Since
1.20
Parameters
mixed$index
mixed$value

Implements ArrayAccess.

GenericArrayObject::preSetElement (   $index,
  $value 
)
protected

Gets called before a new element is added to the ArrayObject.

At this point the index is always set (ie not null) and the value is always of the type returned by

See Also
getObjectType.

Should return a boolean. When false is returned the element does not get added to the ArrayObject.

Since
1.20
Parameters
int | string$index
mixed$value
Returns
bool
GenericArrayObject::serialize ( )
See Also
Serializable::serialize
Since
1.20
Returns
string

Implements Serializable.

GenericArrayObject::setElement (   $index,
  $value 
)
protected

Method that actually sets the element and holds all common code needed for set operations, including type checking and offset resolving.

If you want to do additional indexing or have code that otherwise needs to be executed whenever an element is added, you can overload

See Also
preSetElement.
Since
1.20
Parameters
mixed$index
mixed$value
Exceptions
InvalidArgumentException
GenericArrayObject::unserialize (   $serialization)
See Also
Serializable::unserialize
Since
1.20
Parameters
string$serialization
Returns
array

Implements Serializable.


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