- Developper API  2.0.5
AbstractDataObject Class Reference

Object that implements methods to read through SimpleXMLElement. More...

Inheritance diagram for AbstractDataObject:
Owner Wine Winery Range

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

Detailed Description

Object that implements methods to read through SimpleXMLElement.

Author:
Thomas
Version:
1.0
Date:
08/12/2011

The AbstractDataObject implements a range of methods that can be used to retrieve information in SimpleXMLObject.


Constructor & Destructor Documentation

__construct ( id,
type,
xmlObject,
language 
) [protected]

Can and must only be call from subclass.

Parameters:
Stringid is what will be used to identify the object and query other objects.
TYPEtype relates to the pseudo-enum TYPE and refer to the object type.
SimpleXMLElementxmlObject represents the object on which queries will be done.
Stringlanguage is the language in which the first query has been done.
Returns:
AbstractDataObject

Reimplemented in Wine, Winery, Owner, and Range.

Definition at line 47 of file AbstractDataObject.php.


Member Function Documentation

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.

Parameters:
Propertyproperty 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.

Parameters:
Propertyproperty 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.

Returns:
Property[]

Definition at line 131 of file AbstractDataObject.php.

getId ( ) [final]

Returns as a String the id.

Returns:
String / false

Definition at line 68 of file AbstractDataObject.php.

getLanguage ( ) [final]

Returns as a String the language in which the query has been done.

Returns:
String / false

Definition at line 77 of file AbstractDataObject.php.

getNonCustomProperties ( ) [final]

Returns all non-custom properties.

Returns:
Property[]

Definition at line 148 of file AbstractDataObject.php.

getProperties ( ) [final]

Returns all properties.

Returns:
Property[]

Definition at line 104 of file AbstractDataObject.php.

getProperty ( propertyName) [final]

Returns an array of property having the specified name.

Parameters:
StringpropertyName corresponds to the seeking property.
Returns:
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.

Returns:
String / false

Definition at line 59 of file AbstractDataObject.php.

hasProperty ( propertyName) [final]

Returns whether or not a property exists.

Returns:
Boolean.

Definition at line 86 of file AbstractDataObject.php.

isCustomProperties ( label) [abstract, protected]

Must be implemented in subclasses and is used to know whether a property is custom or defined.

Returns:
Boolean

Reimplemented in Wine, Winery, and Owner.


Field Documentation

$TYPE [static]
Initial value:
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.


The documentation for this class was generated from the following file: