![]() |
- Developper API
2.0.5
|
Object that implements methods to read through SimpleXMLElement. More...
Public Member Functions | |
getType () | |
Returns as a String the type of the object based on $TYPE in AbstractDataObject. | |
getId () | |
Returns as a String the id. | |
getLanguage () | |
Returns as a String the language in which the query has been done. | |
hasProperty ($propertyName) | |
Returns whether or not a property exists. | |
getProperties () | |
Returns all properties. | |
getCustomProperties () | |
Returns all custom properties. | |
getNonCustomProperties () | |
Returns all non-custom properties. | |
getProperty ($propertyName) | |
Returns an array of property having the specified name. | |
addSimpleProperty ($property) | |
Add property to the current object. It uses the name and the value only. To insert a full property use addProperty instead. | |
addProperty ($property) | |
Add property to the current object. It uses the name and the value only. To insert a full property use addProperty instead. | |
Static Public Attributes | |
static | $TYPE |
Protected Member Functions | |
__construct ($id, $type, $xmlObject, $language) | |
Can and must only be call from subclass. | |
isCustomProperties ($label) | |
Must be implemented in subclasses and is used to know whether a property is custom or defined. | |
Protected Attributes | |
$xmlObject |
Object that implements methods to read through SimpleXMLElement.
The AbstractDataObject implements a range of methods that can be used to retrieve information in SimpleXMLObject.
__construct | ( | $ | id, |
$ | type, | ||
$ | xmlObject, | ||
$ | language | ||
) | [protected] |
Can and must only be call from subclass.
String | id is what will be used to identify the object and query other objects. |
TYPE | type relates to the pseudo-enum TYPE and refer to the object type. |
SimpleXMLElement | xmlObject represents the object on which queries will be done. |
String | language is the language in which the first query has been done. |
Reimplemented in Wine, Winery, Owner, and Range.
Definition at line 47 of file AbstractDataObject.php.
addProperty | ( | $ | property | ) | [final] |
Add property to the current object. It uses the name and the value only. To insert a full property use addProperty instead.
Property | property is the property that will be added to the root node. |
Definition at line 196 of file AbstractDataObject.php.
addSimpleProperty | ( | $ | property | ) | [final] |
Add property to the current object. It uses the name and the value only. To insert a full property use addProperty instead.
Property | property is the property that will be added to the root node. |
Definition at line 187 of file AbstractDataObject.php.
getCustomProperties | ( | ) | [final] |
Returns all custom properties.
Definition at line 131 of file AbstractDataObject.php.
getId | ( | ) | [final] |
Returns as a String the id.
Definition at line 68 of file AbstractDataObject.php.
getLanguage | ( | ) | [final] |
Returns as a String the language in which the query has been done.
Definition at line 77 of file AbstractDataObject.php.
getNonCustomProperties | ( | ) | [final] |
Returns all non-custom properties.
Definition at line 148 of file AbstractDataObject.php.
getProperties | ( | ) | [final] |
getProperty | ( | $ | propertyName | ) | [final] |
Returns an array of property having the specified name.
String | propertyName corresponds to the seeking property. |
Definition at line 166 of file AbstractDataObject.php.
getType | ( | ) | [final] |
Returns as a String the type of the object based on $TYPE in AbstractDataObject.
Definition at line 59 of file AbstractDataObject.php.
hasProperty | ( | $ | propertyName | ) | [final] |
Returns whether or not a property exists.
Definition at line 86 of file AbstractDataObject.php.
isCustomProperties | ( | $ | label | ) | [abstract, protected] |
$TYPE [static] |
array( "WINERY"=>0,"WINE"=>1,"RANGE"=>2,"OWNER"=>3 )
Definition at line 26 of file AbstractDataObject.php.
$xmlObject [protected] |
Definition at line 24 of file AbstractDataObject.php.