本文整理汇总了PHP中Kwc_Abstract::_getIndirectChildComponentClasses方法的典型用法代码示例。如果您正苦于以下问题:PHP Kwc_Abstract::_getIndirectChildComponentClasses方法的具体用法?PHP Kwc_Abstract::_getIndirectChildComponentClasses怎么用?PHP Kwc_Abstract::_getIndirectChildComponentClasses使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Kwc_Abstract
的用法示例。
在下文中一共展示了Kwc_Abstract::_getIndirectChildComponentClasses方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _getIndirectChildComponentClasses
private static function _getIndirectChildComponentClasses($class, $select, $cacheId)
{
static $ccc = array();
$currentCacheId = 'iccc-' . md5($class . $cacheId);
if (isset($ccc[$class . $cacheId])) {
Kwf_Benchmark::count('iccc cache hit');
return $ccc[$class . $cacheId];
}
$ret = Kwf_Cache_SimpleStatic::fetch($currentCacheId, $success);
if ($success) {
$ccc[$class . $cacheId] = $ret;
Kwf_Benchmark::count('iccc cache semi-hit');
return $ret;
}
Kwf_Benchmark::count('iccc cache miss', $class . ' ' . print_r($select->getParts(), true));
$childConstraints = array('page' => false);
$ccc[$class . $cacheId] = array();
foreach (Kwc_Abstract::getChildComponentClasses($class, $childConstraints) as $childClass) {
if (Kwc_Abstract::getChildComponentClasses($childClass, $select, $cacheId)) {
$ccc[$class . $cacheId][] = $childClass;
continue;
}
$classes = Kwc_Abstract::_getIndirectChildComponentClasses($childClass, $select, $cacheId);
if ($classes) {
$ccc[$class . $cacheId][] = $childClass;
}
}
$ccc[$class . $cacheId] = array_unique(array_values($ccc[$class . $cacheId]));
Kwf_Cache_SimpleStatic::add($currentCacheId, $ccc[$class . $cacheId]);
return $ccc[$class . $cacheId];
}