本文整理汇总了PHP中eZTemplateCompiler::processNodeCombiningChildren方法的典型用法代码示例。如果您正苦于以下问题:PHP eZTemplateCompiler::processNodeCombiningChildren方法的具体用法?PHP eZTemplateCompiler::processNodeCombiningChildren怎么用?PHP eZTemplateCompiler::processNodeCombiningChildren使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eZTemplateCompiler
的用法示例。
在下文中一共展示了eZTemplateCompiler::processNodeCombiningChildren方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: processNodeCombiningChildren
static function processNodeCombiningChildren($useComments, $php, $tpl, &$nodeChildren, &$resourceData, &$parentNode)
{
$newNodeChildren = array();
$lastNode = false;
foreach ($nodeChildren as $node) {
$newNode = false;
if (!isset($node[0])) {
continue;
}
$nodeType = $node[0];
if ($nodeType == eZTemplate::NODE_ROOT) {
$children = $node[1];
$newNode = array($nodeType, false);
if ($children) {
eZTemplateCompiler::processNodeCombiningChildren($useComments, $php, $tpl, $children, $resourceData, $newNode);
}
} else {
if ($nodeType == eZTemplate::NODE_TEXT) {
$text = $node[2];
$placement = $node[3];
$newNode = array($nodeType, false, $text, $placement);
eZTemplateCompiler::combineStaticNodes($tpl, $resourceData, $lastNode, $newNode);
} else {
if ($nodeType == eZTemplate::NODE_VARIABLE) {
$variableCustom = $node[1];
$variableData = $node[2];
$variablePlacement = $node[3];
$variableParameters = false;
$dataInspection = eZTemplateCompiler::inspectVariableData($tpl, $variableData, $variablePlacement, $resourceData);
$newNode = $node;
$newNode[1] = $variableCustom;
unset($dataInspection);
eZTemplateCompiler::combineStaticNodes($tpl, $resourceData, $lastNode, $newNode);
} else {
if ($nodeType == eZTemplate::NODE_FUNCTION) {
$functionChildren = $node[1];
$functionName = $node[2];
$functionParameters = $node[3];
$functionPlacement = $node[4];
$newNode = array($nodeType, false, $functionName, $functionParameters, $functionPlacement);
if (isset($node[5])) {
$newNode[5] = $node[5];
}
if (is_array($functionChildren)) {
eZTemplateCompiler::processNodeCombiningChildren($useComments, $php, $tpl, $functionChildren, $resourceData, $newNode);
}
} else {
$newNode = $node;
}
}
}
}
if ($lastNode != false) {
$newNodeChildren[] = $lastNode;
$lastNode = false;
}
if ($newNode != false) {
$lastNode = $newNode;
}
}
if ($lastNode != false) {
$newNodeChildren[] = $lastNode;
$lastNode = false;
}
$parentNode[1] = $newNodeChildren;
}