本文整理匯總了PHP中Dwoo_Compiler::injectBlock方法的典型用法代碼示例。如果您正苦於以下問題:PHP Dwoo_Compiler::injectBlock方法的具體用法?PHP Dwoo_Compiler::injectBlock怎麽用?PHP Dwoo_Compiler::injectBlock使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Dwoo_Compiler
的用法示例。
在下文中一共展示了Dwoo_Compiler::injectBlock方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: preProcessing
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: 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;
}
示例3: 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;
}