PHP Class Prado\Data\SqlMap\Configuration\TSqlMapXmlConfigBuilder

Show file Open project: pradosoft/prado

Protected Methods

Method Description
createObjectFromNode ( $node ) : 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.
getAbsoluteFilePath ( $basefile, $resource ) : string Gets the filename relative to the basefile.
getConfigFile ( ) : string
getElementByIdValue ( SimpleXmlDocument $document, $tag, $value ) : SimpleXmlElement Get element node by ID value (try for attribute name ID as case insensitive).
loadXmlDocument ( $filename, TSqlMapXmlConfiguration $config ) : SimpleXmlElement Load document using simple xml.
setObjectPropFromNode ( $obj, $node, $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.

Method Details

createObjectFromNode() protected method

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 createObjectFromNode ( $node ) : Object
return Object new instance of class with class name given by 'class' attribute value.

getAbsoluteFilePath() protected method

Gets the filename relative to the basefile.
protected getAbsoluteFilePath ( $basefile, $resource ) : string
return string absolute filename.

getConfigFile() abstract protected method

abstract protected getConfigFile ( ) : string
return string configuration file.

getElementByIdValue() protected method

Get element node by ID value (try for attribute name ID as case insensitive).
protected getElementByIdValue ( SimpleXmlDocument $document, $tag, $value ) : SimpleXmlElement
$document SimpleXmlDocument
return SimpleXmlElement node if found, null otherwise.

loadXmlDocument() protected method

Load document using simple xml.
protected loadXmlDocument ( $filename, TSqlMapXmlConfiguration $config ) : SimpleXmlElement
$config TSqlMapXmlConfiguration
return SimpleXmlElement xml document.

setObjectPropFromNode() protected method

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.
protected setObjectPropFromNode ( $obj, $node, $except = [] )