예제 #1
0
 public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type)
 {
     $with =& $compiler->findBlock('for', true);
     $params['initialized'] = true;
     $compiler->injectBlock($type, $params);
     return '';
 }
예제 #2
0
파일: else.php 프로젝트: netfreak/pyrocms
 public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type)
 {
     $preContent = '';
     while (true) {
         $preContent .= $compiler->removeTopBlock();
         $block =& $compiler->getCurrentBlock();
         $interfaces = class_implements($block['class'], false);
         if (in_array('Dwoo_IElseable', $interfaces) !== false) {
             break;
         }
     }
     $params['initialized'] = true;
     $compiler->injectBlock($type, $params);
     return $preContent;
 }
예제 #3
0
파일: else.php 프로젝트: huayuxian/FUEL-CMS
 public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type)
 {
     $preContent = '';
     while (true) {
         $preContent .= $compiler->removeTopBlock();
         $block =& $compiler->getCurrentBlock();
         if (!$block) {
             throw new Dwoo_Compilation_Exception($compiler, 'An else block was found but it was not preceded by an if or other else-able construct');
         }
         $interfaces = class_implements($block['class'], false);
         if (in_array('Dwoo_IElseable', $interfaces) !== false) {
             break;
         }
     }
     $params['initialized'] = true;
     $compiler->injectBlock($type, $params);
     return $preContent;
 }