public static function preProcessing(Compiler $compiler, array $params, $prepend, $append, $type)
 {
     $with =& $compiler->findBlock('with', true);
     $params['initialized'] = true;
     $compiler->injectBlock($type, $params);
     return '';
 }
 public static function postProcessing(Compiler $compiler, array $params, $prepend, $append, $content)
 {
     try {
         $compiler->findBlock('dynamic');
         return $content;
     } catch (CompilationException $e) {
     }
     $output = Compiler::PHP_OPEN . 'if($doCache) {' . "\n\t" . 'echo \'<dwoo:dynamic_\'.$dynamicId.\'>' . str_replace('\'', '\\\'', $content) . '</dwoo:dynamic_\'.$dynamicId.\'>\';' . "\n} else {\n\t";
     if (substr($content, 0, strlen(Compiler::PHP_OPEN)) == Compiler::PHP_OPEN) {
         $output .= substr($content, strlen(Compiler::PHP_OPEN));
     } else {
         $output .= Compiler::PHP_CLOSE . $content;
     }
     if (substr($output, -strlen(Compiler::PHP_CLOSE)) == Compiler::PHP_CLOSE) {
         $output = substr($output, 0, -strlen(Compiler::PHP_CLOSE));
     } else {
         $output .= Compiler::PHP_OPEN;
     }
     $output .= "\n}" . Compiler::PHP_CLOSE;
     return $output;
 }