Changeset View
Changeset View
Standalone View
Standalone View
branches/5.2.x/core/kernel/nparser/ntags.php
Show First 20 Lines • Show All 303 Lines • ▼ Show 20 Line(s) | |||||
// $code[] = "}"; | // $code[] = "}"; | ||||
$o .= '<?'.'php '; | $o .= '<?'.'php '; | ||||
$this->AppendCode($o, $this->Parser->BreakCache('', $pointer.'a', "\$_parser->CachableElements['".$tag['NP']['name']."']"), false); | $this->AppendCode($o, $this->Parser->BreakCache('', $pointer.'a', "\$_parser->CachableElements['".$tag['NP']['name']."']"), false); | ||||
$this->AppendCode($o, "echo (\$_parser->ParseBlock($to_pass));\n", false); | $this->AppendCode($o, "echo (\$_parser->ParseBlock($to_pass));\n", false); | ||||
$this->AppendCode($o, $this->Parser->BreakCache('', $pointer.'b') . " ?".">\n", false); | $this->AppendCode($o, $this->Parser->BreakCache('', $pointer.'b') . " ?".">\n", false); | ||||
// $this->AppendCode($o, "if (!\$_parser->CacheStartOrContinue(\$_parser->CachableElements['".$tag['NP']['name']."'], '{$pointer}')) {".' ?'.'>', false); | // $this->AppendCode($o, "if (!\$_parser->CacheStartOrContinue(\$_parser->CachableElements['".$tag['NP']['name']."'], '{$pointer}')) {".' ?'.'>', false); | ||||
*/ | */ | ||||
$this->AppendCode($o, "echo (\$_parser->ParseBlock($to_pass));"); | $code = array("echo (\$_parser->ParseBlock($to_pass));"); | ||||
if ( array_key_exists('result_to_var', $tag['NP']) && $tag['NP']['result_to_var'] ) { | |||||
$param_name = $tag['NP']['result_to_var']; | |||||
$code[] = "\$params['{$param_name}'] = \$_parser->GetParam('{$param_name}');"; | |||||
$code[] = "\${$param_name} = \$params['{$param_name}'];"; | |||||
} | |||||
$this->AppendCode($o, $code); | |||||
return $o; | return $o; | ||||
} | } | ||||
$this->Single = false; | $this->Single = false; | ||||
$this->OriginalTag = $tag; | $this->OriginalTag = $tag; | ||||
$tag['NP']['name'] = $tag['NP']['design'] . '_' . abs(crc32($tag['file'])) . '_' . $tag['line']; //'__lambda'; | $tag['NP']['name'] = $tag['NP']['design'] . '_' . abs(crc32($tag['file'])) . '_' . $tag['line']; //'__lambda'; | ||||
return parent::Open($tag); | return parent::Open($tag); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 385 Lines • ▼ Show 20 Line(s) | |||||
$code = Array (); | $code = Array (); | ||||
$code[] = '$res = ob_get_clean();'; | $code[] = '$res = ob_get_clean();'; | ||||
$code[] = 'echo $_parser->CompressScript($res, true, \'' . $this->Tag['NP']['type'] . '\');'; | $code[] = 'echo $_parser->CompressScript($res, true, \'' . $this->Tag['NP']['type'] . '\');'; | ||||
$this->AppendCode($o, $code); | $this->AppendCode($o, $code); | ||||
return $o; | return $o; | ||||
} | } | ||||
} | } | ||||
No newline at end of file |