From 9f181be10fb44a768750c2d9fa4cb4d9f66bc836 Mon Sep 17 00:00:00 2001 From: "godzilla80@gmx.net" <> Date: Fri, 1 May 2009 09:53:23 +0000 Subject: Fixed Issue #122 - SqlMap: support for properties in resource filenames, fix sqlmap doc - property "name" instead of "key" --- framework/Data/SqlMap/Configuration/TSqlMapXmlConfiguration.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'framework') 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); -- cgit v1.2.3