[ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Source view] [Print] [Project Stats]
Extends ArrayObject and does two things: Allows for deriving classes to easily intercept additions and deletions for purposes such as additional indexing.
Author: | Jeroen De Dauw < [email protected] > |
License: | GNU GPL v2+ |
File Size: | 240 lines (6 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
getNewOffset() X-Ref |
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... return: integer |
__construct( $input = null, $flags = 0, $iterator_class = 'ArrayIterator' ) X-Ref |
Constructor. param: null|array $input param: int $flags param: string $iterator_class |
append( $value ) X-Ref |
param: mixed $value |
offsetSet( $index, $value ) X-Ref |
param: mixed $index param: mixed $value |
hasValidType( $value ) X-Ref |
Returns if the provided value has the same type as the elements that can be added to this ArrayObject. param: mixed $value return: boolean |
setElement( $index, $value ) X-Ref |
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 preSetElement. param: mixed $index param: mixed $value |
preSetElement( $index, $value ) X-Ref |
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 getObjectType. Should return a boolean. When false is returned the element does not get added to the ArrayObject. param: integer|string $index param: mixed $value return: boolean |
serialize() X-Ref |
return: string |
getSerializationData() X-Ref |
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. return: array |
unserialize( $serialization ) X-Ref |
param: string $serialization return: array |
isEmpty() X-Ref |
Returns if the ArrayObject has no elements. return: boolean |
Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |