preg_match_all('/\$(\w+)(\[(\w+)\])?/', $rawData, $variableMatches);
// Debug message
- //* DEBUG: */ $this->debugOutput(__METHOD__ . ':rawData(' . strlen($rawData) . ')=' . $rawData . ',variableMatches=' . print_r($variableMatches, true));
+ //* NOISY-DEBUG: */ $this->debugOutput(__METHOD__ . ':rawData(' . strlen($rawData) . ')=' . $rawData . ',variableMatches=' . print_r($variableMatches, true));
// Did we find some variables?
if ((is_array($variableMatches)) && (count($variableMatches) == 4) && (count($variableMatches[0]) > 0)) {
if (($foundIndex !== false) && (isset($templateMatches[3][$foundIndex]))) {
// Split it up with another reg. exp. into variable=value pairs
preg_match_all($this->regExpVarValue, $templateMatches[3][$foundIndex], $varMatches);
- ///* DEBUG: */ $this->debugOutput(__METHOD__ . ':varMatches=' . print_r($varMatches,true));
+ //* NOISY-DEBUG: */ $this->debugOutput(__METHOD__ . ':varMatches=' . print_r($varMatches, true));
// Assign all variables
$this->assignAllVariables($varMatches);
preg_match_all($this->regExpCodeTags, $rawData, $templateMatches);
// Debug message
- //* DEBUG: */ $this->debugOutput(__METHOD__ . ':templateMatches=' . print_r($templateMatches , true));
+ //* NOISY-DEBUG: */ $this->debugOutput(__METHOD__ . ':templateMatches=' . print_r($templateMatches , true));
// Analyze the matches array
if ((is_array($templateMatches)) && (count($templateMatches) == 4) && (count($templateMatches[0]) > 0)) {
*/
public function compileRawCode ($rawCode, $setMatchAsCode=false) {
// Find the variables
- //* DEBUG: */ $this->debugOutput(__METHOD__ . ':rawCode=<pre>' . htmlentities($rawCode) . '</pre>');
+ //* NOISY-DEBUG: */ $this->debugOutput(__METHOD__ . ':rawCode=<pre>' . htmlentities($rawCode) . '</pre>');
preg_match_all($this->regExpVarValue, $rawCode, $varMatches);
// Compile all variables
- //* DEBUG: */ $this->debugOutput(__METHOD__ . ':<pre>' . print_r($varMatches, true) . '</pre>');
+ //* NOISY-DEBUG: */ $this->debugOutput(__METHOD__ . ':<pre>' . print_r($varMatches, true) . '</pre>');
foreach ($varMatches[0] as $match) {
// Add variable tags around it
$varCode = '{?' . $match . '?}';
// Is the variable found in code? (safes some calls)
if (strpos($rawCode, $varCode) !== false) {
// Debug message
- //* DEBUG: */ $this->debugOutput(__METHOD__ . ': match=' . $match . ',value[' . gettype($value) . ']=' . $value);
+ //* DEBUG: */ $this->debugOutput(__METHOD__ . ': match=' . $match . ',rawCode[' . gettype($rawCode) . ']=' . $rawCode);
// Use $match as new value or $value from read variable?
if ($setMatchAsCode === true) {