本文整理汇总了PHP中Iterator::setOutputFilterItemsClass方法的典型用法代码示例。如果您正苦于以下问题:PHP Iterator::setOutputFilterItemsClass方法的具体用法?PHP Iterator::setOutputFilterItemsClass怎么用?PHP Iterator::setOutputFilterItemsClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Iterator
的用法示例。
在下文中一共展示了Iterator::setOutputFilterItemsClass方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getChildren
/**
* getter na potomky, ktere budou v prvni urovni prispevku serazeny sestupne
* @return DiscussionsRecords
*/
public function getChildren()
{
try {
if ($this->children instanceof AbstractRecords || $this->records instanceof LBoxPagingIterator) {
return $this->children;
}
$treeColNames = $this->getClassVar("treeColNames");
$parentId = NULL;
foreach (LBoxFront::getUrlParamsArray() as $param) {
if (preg_match("/" . $this->patternURLParamReplyTo . "/", $param, $matches)) {
$parentId = $matches[1];
}
}
if (!$this->hasParent() && $parentId) {
// replyto
$this->children = new DiscussionsRecordsNotTree(array($this->getClassVar("idColName") => $parentId));
$this->children->setOutputFilterItemsClass("OutputFilterDiscussionRecord");
} else {
// strankovany vypis z rootu
if (!$this->hasParent() && is_numeric($pageItems = LBoxConfigManagerProperties::gpcn("discussion_paging_pageitems")) && $pageItems > 0) {
$this->children = new LBoxPagingIteratorRecords("DiscussionsRecordsNotTree", $pageItems, get_class($this->outputFilter), array($treeColNames[2] => $this->getParamDirect($this->getClassVar("idColName"))), array($treeColNames[0] => 0));
} else {
$this->children = parent::getChildren(false, $this->hasParent() ? array($treeColNames[0] => 1) : array($treeColNames[0] => 0));
}
}
return $this->children;
} catch (Exception $e) {
throw $e;
}
}