}
// Get configuration instance
- $cfgInstance = $tplInstance->getConfigInstance();
+ $cfgInstance = FrameworkConfiguration::getInstance();
// Set the base path
$tplInstance->setBasePath($basePath);
// Walk through all variables
for ($idx = $this->varStack->getIterator(); $idx->valid(); $idx->next()) {
-
// Get current entry
$currEntry = $idx->current();
// Replace all [$var] or {?$var?} with the content
+ //* DEBUG: */ echo "name=".$currEntry['name'].", value=<pre>".htmlentities($currEntry['value'])."</pre>\n";
$content = str_replace("\$content[".$currEntry['name']."]", $currEntry['value'], $content);
$content = str_replace("[".$currEntry['name']."]", $currEntry['value'], $content);
$content = str_replace("{?".$currEntry['name']."?}", $currEntry['value'], $content);
-
} // END - for
// Set the content back
$currVariable = $idx->current();
// Transfer it's name/value combination to the $content array
+ //* DEBUG: */ echo $currVariable['name']."=<pre>".htmlentities($currVariable['value'])."</pre>\n";
$dummy[$currVariable['name']] = $currVariable['value'];
}// END - if
$this->finalizeVariableCompilation();
// Prepare the eval() command for comiling the template
- $eval = sprintf("\$this->setCompiledData(\"%s\");",
+ $eval = sprintf("\$result = \"%s\";",
addslashes($this->getRawTemplateData())
);
// Run the constructed command. This will "compile" all variables in
eval($eval);
+
+ // Set the new content
+ $this->setCompiledData($result);
}
/**