diff options
author | godzilla80@gmx.net <> | 2009-05-01 09:53:23 +0000 |
---|---|---|
committer | godzilla80@gmx.net <> | 2009-05-01 09:53:23 +0000 |
commit | 9f181be10fb44a768750c2d9fa4cb4d9f66bc836 (patch) | |
tree | 4e4b56f72b34b57ad2f0bde276fc2bf1102ceeaf /framework/Data | |
parent | c6904380ac34536c0f3d65d3c92deaa9fa532f4a (diff) |
Fixed Issue #122 - SqlMap: support for properties in resource filenames, fix sqlmap doc - property "name" instead of "key"
Diffstat (limited to 'framework/Data')
-rw-r--r-- | framework/Data/SqlMap/Configuration/TSqlMapXmlConfiguration.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/framework/Data/SqlMap/Configuration/TSqlMapXmlConfiguration.php b/framework/Data/SqlMap/Configuration/TSqlMapXmlConfiguration.php index ce122f6a..5854b21a 100644 --- a/framework/Data/SqlMap/Configuration/TSqlMapXmlConfiguration.php +++ b/framework/Data/SqlMap/Configuration/TSqlMapXmlConfiguration.php @@ -89,6 +89,9 @@ abstract class TSqlMapXmlConfigBuilder */
protected function loadXmlDocument($filename,TSqlMapXmlConfiguration $config)
{
+ if( strpos($filename, '${') !== false)
+ $filename = $config->replaceProperties($filename);
+
if(!is_file($filename))
throw new TSqlMapConfigurationException(
'sqlmap_unable_to_find_config', $filename);
@@ -228,6 +231,9 @@ class TSqlMapXmlConfiguration extends TSqlMapXmlConfigBuilder {
if(strlen($resource = (string)$node['resource']) > 0)
{
+ if( strpos($resource, '${') !== false)
+ $resource = $this->replaceProperties($resource);
+
$mapping = new TSqlMapXmlMappingConfiguration($this);
$filename = $this->getAbsoluteFilePath($this->_configFile, $resource);
$mapping->configure($filename);
|