\JDataSet
JDataSet is a collection class that allows the developer to operate on a set of JData objects as if they were in a typical PHP array.
Synopsis
class JDataSet
implements
JDataDumpable,ArrayAccess,Countable,Iterator
{
- // methods
- public void __construct()
- public array __call()
- public array __get()
- public boolean __isset()
- public void __set()
- public void __unset()
- public integer count()
- public JDataSet clear()
- public JData current()
- public array dump()
- public array jsonSerialize()
- public scalar key()
- public array keys()
- public void next()
- public boolean offsetExists()
- public JData offsetGet()
- public void offsetSet()
- public void offsetUnset()
- public void rewind()
- public boolean valid()
- private void _initialise()
Hierarchy
Implements
Members
private
- $_current
—
integer
The current position of the iterator. - $_objects
—
array
The iterator objects.
Methods
private
- _initialise() — Initialises the list with an array of objects.
public
- __construct() — The class constructor.
- __call() — The magic call method is used to call object methods using the iterator.
- __get() — The magic get method is used to get a list of properties from the objects in the data set.
- __isset() — The magic isset method is used to check the state of an object property using the iterator.
- __set() — The magic set method is used to set an object property using the iterator.
- __unset() — The magic unset method is used to unset an object property using the iterator.
- clear() — Clears the objects in the data set.
- count() — Gets the number of data objects in the set.
- current() — Get the current data object in the set.
- dump() — Dumps the data object in the set, recursively if appropriate.
- jsonSerialize() — Gets the data set in a form that can be serialised to JSON format.
- key() — Gets the key of the current object in the iterator.
- keys() — Gets the array of keys for all the objects in the iterator (emulates array_keys).
- next() — Advances the iterator to the next object in the iterator.
- offsetExists() — Checks whether an offset exists in the iterator.
- offsetGet() — Gets an offset in the iterator.
- offsetSet() — Sets an offset in the iterator.
- offsetUnset() — Unsets an offset in the iterator.
- rewind() — Rewinds the iterator to the first object.
- valid() — Validates the iterator.