+ /**
+ * Finalizes the compilation of all template variables
+ *
+ * @return void
+ */
+ private function finalizeVariableCompilation () {
+ // Get the content
+ $content = $this->getRawTemplateData();
+
+ // 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
+ $this->setRawTemplateData($content);
+ }
+