diff --git a/src/config/GlobalConfig.php b/src/config/GlobalConfig.php index 96daa584..dd77b415 100644 --- a/src/config/GlobalConfig.php +++ b/src/config/GlobalConfig.php @@ -122,7 +122,7 @@ protected function runResolver($ctx) { } } - foreach($ctx->query('*[not(name()="property")]/@*') as $attr) { + foreach($ctx->query('//*[not(name()="property")]/@*') as $attr) { $attr->nodeValue = $this->resolveValue($attr->nodeValue, $vars); } @@ -130,7 +130,7 @@ protected function runResolver($ctx) { } protected function resolveValue($value, Array $vars) { - return preg_replace_callback('/\${(.*)}/', function($matches) use ($vars) { var_dump($matches); return isset($vars[$matches[1]]) ? $vars[$matches[1]] : $matches[0]; }, $value); + return preg_replace_callback('/\${(.*?)}/', function($matches) use ($vars) { return isset($vars[$matches[1]]) ? $vars[$matches[1]] : $matches[0]; }, $value); } } @@ -141,4 +141,4 @@ class ConfigException extends \Exception { const NoCollectorSection = 2; const NoGeneratorSection = 3; } -} \ No newline at end of file +}