public function after(PHPTAL_Php_CodeWriter $codewriter) { $codewriter->doEval('file_put_contents(' . $codewriter->str($codewriter->getCacheFilesBaseName()) . '.md5(' . $this->cache_tag . '), ob_get_flush())'); $codewriter->doElse(); $codewriter->doEval('readfile(' . $codewriter->str($codewriter->getCacheFilesBaseName()) . '.md5(' . $this->cache_tag . '))'); $codewriter->doEnd('if'); }
public function before(PHPTAL_Php_CodeWriter $codewriter) { $this->tmp_var = $codewriter->createTempVariable(); $codewriter->doSetVar($this->tmp_var, $codewriter->interpolateTalesVarsInString($this->expression)); $codewriter->doIf('$ctx->hasSlot(' . $this->tmp_var . ')'); $codewriter->pushCode('$ctx->echoSlot(' . $this->tmp_var . ')'); $codewriter->doElse(); }
public function after(PHPTAL_Php_CodeWriter $codewriter) { $codewriter->doEval('file_put_contents(' . $this->cache_filename_var . ', ob_get_flush())'); $codewriter->doElse(); $codewriter->doEval('readfile(' . $this->cache_filename_var . ')'); $codewriter->doEnd('if'); $codewriter->recycleTempVariable($this->cache_filename_var); }
public function before(PHPTAL_Php_CodeWriter $codewriter) { $codewriter->doIf('$ctx->hasSlot(' . $codewriter->str($this->expression) . ')'); $codewriter->pushCode('echo $ctx->getSlot(' . $codewriter->str($this->expression) . ')'); $codewriter->doElse(); }