public
|
#
__construct( mixed $properties = array() )
The class constructor.
Parameters
- $properties
mixed - $properties Either an associative array or another object by which to set the
initial properties of the new object.
Throws
Since
1.0
|
public
mixed
|
#
__get( string $property )
The magic get method is used to get a data property.
The magic get method is used to get a data property.
This method is a public proxy for the protected getProperty method.
Note: Magic __get does not allow recursive calls. This can be tricky because
the error generated by recursing into __get is "Undefined property:
{CLASS}::{PROPERTY}" which is misleading. This is relevant for this class
because requesting a non-visible property can trigger a call to a sub-function.
If that references the property directly in the object, it will cause a
recursion into __get.
Parameters
- $property
string - $property The name of the data property.
Returns
mixed - The value of the data property, or null if the data property does not exist.
Since
1.0
See
|
public
boolean
|
#
__isset( string $property )
The magic isset method is used to check the state of an object property.
The magic isset method is used to check the state of an object property.
Parameters
- $property
string - $property The name of the data property.
Returns
boolean - True if set, otherwise false is returned.
Since
1.0
|
public
|
#
__set( string $property, mixed $value )
The magic set method is used to set a data property.
The magic set method is used to set a data property.
This is a public proxy for the protected setProperty method.
Parameters
- $property
string - $property The name of the data property.
- $value
mixed - $value The value to give the data property.
Since
1.0
See
|
public
|
#
__unset( string $property )
The magic unset method is used to unset a data property.
The magic unset method is used to unset a data property.
Parameters
- $property
string - $property The name of the data property.
Since
1.0
|
public
Joomla\Data\DataObject
|
#
bind( mixed $properties, boolean $updateNulls = true )
Binds an array or object to this object.
Binds an array or object to this object.
Parameters
- $properties
mixed - $properties An associative array of properties or an object.
- $updateNulls
boolean - $updateNulls True to bind null values, false to ignore null values.
Returns
Throws
Since
1.0
|
public
stdClass
|
#
dump( integer $depth = 3, SplObjectStorage $dumped = null )
Dumps the data properties into a stdClass object, recursively if
appropriate.
Dumps the data properties into a stdClass object, recursively if
appropriate.
Parameters
- $depth
integer - $depth The maximum depth of recursion (default = 3). For example, a depth of 0
will return a stdClass with all the properties in native form. A depth of 1 will
recurse into the first level of properties only.
- $dumped
SplObjectStorage - $dumped An array of already serialized objects that is used to avoid infinite
loops.
Returns
stdClass
- The data properties as a simple PHP stdClass object.
Since
1.0
Implementation of
|
public
ArrayIterator
|
#
getIterator( )
Gets this object represented as an ArrayIterator.
Gets this object represented as an ArrayIterator.
This allows the data properties to be access via a foreach statement.
Returns
Since
1.0
See
Implementation of
|
public
string
|
#
jsonSerialize( )
Gets the data properties in a form that can be serialised to JSON format.
Gets the data properties in a form that can be serialised to JSON format.
Returns
string - An object that can be serialised by json_encode().
Since
1.0
Implementation of
|
protected
mixed
|
#
dumpProperty( string $property, integer $depth, SplObjectStorage $dumped )
Dumps a data property.
If recursion is set, this method will dump any object implementing
Data\Dumpable (like Data\Object and Data\Set); it will convert a Date object to
a string; and it will convert a Registry to an object.
Parameters
- $property
string - $property The name of the data property.
- $depth
integer - $depth The current depth of recursion (a value of 0 will ignore recursion).
- $dumped
SplObjectStorage - $dumped An array of already serialized objects that is used to avoid infinite
loops.
Returns
mixed - The value of the dumped property.
Since
1.0
|
protected
mixed
|
#
getProperty( string $property )
Gets a data property.
Parameters
- $property
string - $property The name of the data property.
Returns
mixed - The value of the data property.
Since
1.0
See
|
protected
mixed
|
#
setProperty( string $property, mixed $value )
Sets a data property.
If the name of the property starts with a null byte, this method will return
null.
Parameters
- $property
string - $property The name of the data property.
- $value
mixed - $value The value to give the data property.
Returns
mixed - The value of the data property.
Since
1.0
See
|
public
integer
|
#
count( )
Count the number of data properties.
Count the number of data properties.
Returns
integer - The number of data properties.
Since
1.0
Implementation of
|