本文整理汇总了PHP中Dwoo_Compiler::removeTopBlock方法的典型用法代码示例。如果您正苦于以下问题:PHP Dwoo_Compiler::removeTopBlock方法的具体用法?PHP Dwoo_Compiler::removeTopBlock怎么用?PHP Dwoo_Compiler::removeTopBlock使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Dwoo_Compiler
的用法示例。
在下文中一共展示了Dwoo_Compiler::removeTopBlock方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: preProcessing
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;
}
示例2: preProcessing
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;
}