X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Ftemplate%2Fclass_BaseTemplateEngine.php;h=272b9d718ee1db9c99b4659971af8fee6f6afd75;hp=96952b447f1c4085a6a325558f7b10e9a25faa8f;hb=48732bab3b2ca49cf44cfa5d7921c4073a41809c;hpb=4d4f379499f2e2eb9061924c5576063a698ed88b;ds=sidebyside diff --git a/inc/classes/main/template/class_BaseTemplateEngine.php b/inc/classes/main/template/class_BaseTemplateEngine.php index 96952b44..272b9d71 100644 --- a/inc/classes/main/template/class_BaseTemplateEngine.php +++ b/inc/classes/main/template/class_BaseTemplateEngine.php @@ -173,7 +173,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem { */ private function getVariableIndex ($var, $stack = NULL) { // Replace all dashes to underscores to match variables with configuration entries - $var = trim(str_replace('-', '_', $var)); + $var = trim($this->convertDashesToUnderscores($var)); // First everything is not found $found = false; @@ -248,7 +248,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem { */ protected function readVariable ($var, $stack = NULL) { // Replace all dashes to underscores to match variables with configuration entries - $var = trim(str_replace('-', '_', $var)); + $var = trim($this->convertDashesToUnderscores($var)); // First everything is not found $content = NULL; @@ -336,7 +336,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem { */ public function addGroupVariable ($var, $value) { // Replace all dashes to underscores to match variables with configuration entries - $var = trim(str_replace('-', '_', $var)); + $var = trim($this->convertDashesToUnderscores($var)); // Debug message //* DEBUG: */ $this->debugOutput(__METHOD__.': group=' . $this->currGroup . ', var=' . $var . ', value=' . $value); @@ -373,7 +373,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem { */ private function modifyVariable ($var, $value) { // Replace all dashes to underscores to match variables with configuration entries - $var = trim(str_replace('-', '_', $var)); + $var = trim($this->convertDashesToUnderscores($var)); // Get index for variable $index = $this->getVariableIndex($var); @@ -412,7 +412,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem { */ protected function setVariable ($varGroup, $var, $value) { // Replace all dashes to underscores to match variables with configuration entries - $var = trim(str_replace('-', '_', $var)); + $var = trim($this->convertDashesToUnderscores($var)); // Get index for variable $index = $this->getVariableIndex($var); @@ -437,7 +437,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem { */ private function generateVariableArray ($var, $value) { // Replace all dashes to underscores to match variables with configuration entries - $var = trim(str_replace('-', '_', $var)); + $var = trim($this->convertDashesToUnderscores($var)); // Generate the temporary array $varData = array( @@ -587,7 +587,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem { */ public final function assignVariable ($var, $value) { // Replace all dashes to underscores to match variables with configuration entries - $var = trim(str_replace('-', '_', $var)); + $var = trim($this->convertDashesToUnderscores($var)); // Empty variable found? if (empty($var)) { @@ -783,7 +783,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem { */ private function assignTemplateVariable ($varName, $var) { // Replace all dashes to underscores to match variables with configuration entries - $var = trim(str_replace('-', '_', $var)); + $var = trim($this->convertDashesToUnderscores($var)); // Debug message //* DEBUG: */ $this->debugOutput(__METHOD__ . ': varName=' . $varName . ',var=' . $var); @@ -1007,7 +1007,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem { // Search for all variables foreach ($varMatches[1] as $key => $var) { // Replace all dashes to underscores to match variables with configuration entries - $var = trim(str_replace('-', '_', $var)); + $var = trim($this->convertDashesToUnderscores($var)); // Debug message $this->debugOutput(__METHOD__ . ':key=' . $key . ',var=' . $var); @@ -1148,7 +1148,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem { */ public function assignConfigVariable ($var) { // Replace all dashes to underscores to match variables with configuration entries - $var = trim(str_replace('-', '_', $var)); + $var = trim($this->convertDashesToUnderscores($var)); // Sweet and simple... //* DEBUG: */ $this->debugOutput(__METHOD__ . ': var=' . $var . ',getConfigEntry()=' . $this->getConfigInstance()->getConfigEntry($var));