public function after(PHPTAL_Php_CodeWriter $codewriter) { $var = $codewriter->createTempVariable(); $codewriter->pushCode('ob_end_flush()'); $codewriter->doCatch('Exception ' . $var); $codewriter->pushCode('$tpl->addError(' . $var . ')'); $codewriter->pushCode('ob_end_clean()'); $expression = $this->extractEchoType($this->expression); $code = $codewriter->evaluateExpression($expression); switch ($code) { case PHPTAL_Php_TalesInternal::NOTHING_KEYWORD: break; case PHPTAL_Php_TalesInternal::DEFAULT_KEYWORD: $codewriter->pushHTML('<pre class="phptalError"'); $codewriter->doEchoRaw($var); $codewriter->pushHTML('</pre>'); break; default: $this->doEchoAttribute($codewriter, $code); break; } $codewriter->doEnd(); $codewriter->recycleTempVariable($var); }