diff options
author | wei <> | 2007-05-08 08:20:55 +0000 |
---|---|---|
committer | wei <> | 2007-05-08 08:20:55 +0000 |
commit | 17a2a8440f7ecd5756456528f584424acae27957 (patch) | |
tree | 76f0805d6f914e7a03df1820c4b622c344ea5831 /framework/Data/SqlMap/Configuration/TSqlMapXmlConfiguration.php | |
parent | e9486a539c3a43afcc129f647917780ffc1ed6cd (diff) |
Fixed #616
Diffstat (limited to 'framework/Data/SqlMap/Configuration/TSqlMapXmlConfiguration.php')
-rw-r--r-- | framework/Data/SqlMap/Configuration/TSqlMapXmlConfiguration.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/framework/Data/SqlMap/Configuration/TSqlMapXmlConfiguration.php b/framework/Data/SqlMap/Configuration/TSqlMapXmlConfiguration.php index d92a0f07..b950a194 100644 --- a/framework/Data/SqlMap/Configuration/TSqlMapXmlConfiguration.php +++ b/framework/Data/SqlMap/Configuration/TSqlMapXmlConfiguration.php @@ -87,12 +87,12 @@ abstract class TSqlMapXmlConfigBuilder * @param string filename.
* @return SimpleXmlElement xml document.
*/
- protected function loadXmlDocument($filename)
+ protected function loadXmlDocument($filename,TSqlMapXmlConfiguration $config)
{
if(!is_file($filename))
throw new TSqlMapConfigurationException(
'sqlmap_unable_to_find_config', $filename);
- return simplexml_load_file($filename);
+ return simplexml_load_string($config->replaceProperties(file_get_contents($filename)));
}
/**
@@ -169,7 +169,7 @@ class TSqlMapXmlConfiguration extends TSqlMapXmlConfigBuilder public function configure($filename=null)
{
$this->_configFile=$filename;
- $document = $this->loadXmlDocument($filename);
+ $document = $this->loadXmlDocument($filename,$this);
foreach($document->xpath('//property') as $property)
$this->loadGlobalProperty($property);
@@ -330,7 +330,7 @@ class TSqlMapXmlMappingConfiguration extends TSqlMapXmlConfigBuilder public function configure($filename)
{
$this->_configFile=$filename;
- $document = $this->loadXmlDocument($filename);
+ $document = $this->loadXmlDocument($filename,$this->_xmlConfig);
$this->_document=$document;
foreach($document->xpath('//resultMap') as $node)
@@ -516,7 +516,7 @@ class TSqlMapXmlMappingConfiguration extends TSqlMapXmlConfigBuilder throw new TSqlMapConfigurationException(
'sqlmap_unable_to_find_parent_sql', $extend, $this->_configFile,$node);
}
- $commandText = $this->_xmlConfig->replaceProperties($commandText);
+ //$commandText = $this->_xmlConfig->replaceProperties($commandText);
$statement->initialize($this->_manager);
$this->applyInlineParameterMap($statement, $commandText, $node);
}
|