Methods summary
public
|
#
__clone( )
Copy this model, without the id.
Copy this model, without the id.
|
public
string
|
#
getID( )
Get the id for this model.
Get the id for this model.
Returns
string The ID for this model.
|
public
mixed
|
#
getProperty( string $strPropertyName )
Fetch the property with the given name from the model.
Fetch the property with the given name from the model.
This method returns null if an unknown property is retrieved.
Parameters
- $strPropertyName
string $strPropertyName The property name to be retrieved.
Returns
mixed The value of the given property.
|
public
array
|
#
getPropertiesAsArray( )
Fetch all properties from the model as an name => value array.
Fetch all properties from the model as an name => value array.
Returns
array
|
public
|
#
setID( mixed $mixID )
Set the id for this object.
Set the id for this object.
NOTE: when the Id has been set once to a non null value, it can NOT be
changed anymore.
Normally this should only be called from inside of the implementing
provider.
Parameters
- $mixID
mixed $mixID Could be a integer, string or anything else - depends on the provider
implementation.
|
public
|
#
setProperty( string $strPropertyName, mixed $varValue )
Update the property value in the model.
Update the property value in the model.
Parameters
- $strPropertyName
string $strPropertyName The property name to be set.
- $varValue
mixed $varValue The value to be set.
|
public
|
#
setPropertiesAsArray( array $arrProperties )
Update all properties in the model.
Update all properties in the model.
Parameters
- $arrProperties
array $arrProperties The property values as name => value pairs.
|
public
boolean
|
#
hasProperties( )
Check if this model have any properties.
Check if this model have any properties.
Returns
boolean true if any property has been stored, false otherwise.
|
public
IteratorAggregate
|
#
getIterator( )
Get an iterator for this model's property values.
Get an iterator for this model's property values.
Returns
IteratorAggregate
|
public
|
#
setProviderName( string $strProviderName )
Sets the provider name in the model.
Sets the provider name in the model.
NOTE: this is intended to be used by the data provider only and not by any
user. Changing this by hand may cause unexpected behaviour. So DO NOT USE IT.
For this reason, this method is not interfaced, as only the data provider knows
how to set itself to the model.
Parameters
- $strProviderName
string $strProviderName The name of the corresponding data provider.
|
public
string
|
#
getProviderName( )
Return the data provider name.
Return the data provider name.
Returns
string the name of the corresponding data provider.
|
public
DcGeneral\Data\ModelInterface
|
|
public
DcGeneral\Data\ModelInterface
|
|