DataSet
class DataSet implements DataSetInterface, IteratorAggregate, ArrayAccess, Serializable, Countable, JsonSerializable (View source)
The Data set to store multiple data.
Methods
Constructor.
The magic get method is used to get a list of properties from the objects in the data set.
The magic isset method is used to check the state of an object property using the iterator.
The magic set method is used to set an object property using the iterator.
The magic unset method is used to unset an object property using the iterator.
Property is exist or not.
Get a value of property.
Set value to property
Unset a property.
Get the data store for iterate.
Serialize data.
Unserialize the data.
Count data.
Serialize to json format.
Is this data set empty?
Is this data set has properties?
allToArray
Apply a user supplied function to every member of this object.
Clone this class.
Return all the keys of this DataSet.
Details
at line line 35
__construct(mixed $data = null)
Constructor.
at line line 88
array
__get(string $property)
The magic get method is used to get a list of properties from the objects in the data set.
Example: $array = $dataSet->foo;
This will return a column of the values of the 'foo' property in all the objects (or values determined by custom property setters in the individual Data's). The result array will contain an entry for each object in the list (compared to __call which may not). The keys of the objects and the result array are maintained.
at line line 111
boolean
__isset(string $property)
The magic isset method is used to check the state of an object property using the iterator.
Example: $array = isset($objectList->foo);
at line line 138
void
__set(string $property, mixed $value)
The magic set method is used to set an object property using the iterator.
Example: $objectList->foo = 'bar';
This will set the 'foo' property to 'bar' in all of the objects (or a value determined by custom property setters in the Data).
at line line 159
void
__unset(string $property)
The magic unset method is used to unset an object property using the iterator.
Example: unset($objectList->foo);
This will unset all of the 'foo' properties in the list of Data\Object's.
at line line 175
boolean
offsetExists(mixed $offset)
Property is exist or not.
at line line 187
mixed
offsetGet(mixed $offset)
Get a value of property.
at line line 217
void
offsetSet(mixed $offset, mixed $value)
Set value to property
at line line 241
void
offsetUnset(mixed $offset)
Unset a property.
at line line 251
Traversable
getIterator()
Get the data store for iterate.
at line line 261
string
serialize()
Serialize data.
at line line 285
int
count()
Count data.
at line line 295
mixed
jsonSerialize()
Serialize to json format.
at line line 305
boolean
isNull()
Is this data set empty?
at line line 315
boolean
notNull()
Is this data set has properties?
at line line 346
static array
allToArray(mixed $value)
allToArray
at line line 402
DataSet
walk(callable $callback, mixed $userdata = null)
Apply a user supplied function to every member of this object.
at line line 482
DataSet
uksort(callable $callable)
Sort DataSet by keys using a user-defined comparison function
at line line 582
void
__clone()
Clone this class.
at line line 608
array
getKeys()
Return all the keys of this DataSet.