本文整理匯總了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];
}