Class TSqlMapXmlConfigBuilder
Direct Known Sub-classes:
TSqlMapXmlConfig class file.
| Method Summary |
|
protected
Object
|
Create an instance of an object give by the attribute named 'class' in the node and set the properties on the object given by attribute names and values.
|
|
protected
string
|
Gets the filename relative to the basefile.
|
|
protected
abstract
string
|
|
|
protected
SimpleXmlElement
|
Get element node by ID value (try for attribute name ID as case insensitive).
|
|
protected
SimpleXmlElement
|
Load document using simple xml.
|
|
protected
void
|
For each attributes (excluding attribute named in $except) set the property of the $obj given by the name of the attribute with the value of the attribute.
|
| Method Details |
createObjectFromNode
| protected Object createObjectFromNode |
(SimpleXmlNode $node ) |
Create an instance of an object give by the attribute named 'class' in the node and set the properties on the object given by attribute names and values.
| Input |
| SimpleXmlNode | $node | property node |
| Output |
|
Object
| new instance of class with class name given by 'class' attribute value. |
| Exception |
|
getAbsoluteFilePath
| protected string getAbsoluteFilePath |
(string $basefile , string $resource ) |
Gets the filename relative to the basefile.
| Input |
| string | $basefile | base filename |
| string | $resource | relative filename |
| Output |
|
string
| absolute filename. |
| Exception |
|
getConfigFile
| protected abstract string getConfigFile |
() |
| Output |
|
string
| configuration file. |
| Exception |
|
getElementByIdValue
| protected SimpleXmlElement getElementByIdValue |
(SimpleXmlDocument $document , string $tag , string $value ) |
Get element node by ID value (try for attribute name ID as case insensitive).
| Input |
| SimpleXmlDocument | $document | |
| string | $tag | tag name. |
| string | $value | id value. |
| Output |
|
SimpleXmlElement
| node if found, null otherwise. |
| Exception |
|
loadXmlDocument
| protected SimpleXmlElement loadXmlDocument |
(string $filename , TSqlMapXmlConfiguration $config ) |
Load document using simple xml.
| Input |
| string | $filename | filename. |
| TSqlMapXmlConfiguration | $config | |
| Output |
|
SimpleXmlElement
| xml document. |
| Exception |
|
setObjectPropFromNode
| protected void setObjectPropFromNode |
(Object $obj , SimpleXmlNode $node , array $except ) |
For each attributes (excluding attribute named in $except) set the property of the $obj given by the name of the attribute with the value of the attribute.
| Input |
| Object | $obj | object instance |
| SimpleXmlNode | $node | property node |
| array | $except | exception property name |
| Output |
| Exception |
|
|