protected function crumbs_RuleWeightKeeper::_findWildcardWeight in Crumbs, the Breadcrumbs suite 6.2
Same name and namespace in other branches
- 7 lib/RuleWeightKeeper.php \crumbs_RuleWeightKeeper::_findWildcardWeight()
2 calls to crumbs_RuleWeightKeeper::_findWildcardWeight()
- crumbs_RuleWeightKeeper::findWeight in ./
crumbs.plugin_engine.inc - Determine the weight for the rule specified by the key.
- crumbs_RuleWeightKeeper::_buildPrefixedWeightKeeper in ./
crumbs.plugin_engine.inc
File
- ./
crumbs.plugin_engine.inc, line 293
Class
Code
protected function _findWildcardWeight($key) {
$fragments = explode('.', $key);
$partial_key = array_shift($fragments);
$weight = $this->_rule_weights['*'];
while (!empty($fragments)) {
if (isset($this->_rule_weights[$partial_key . '.*'])) {
$weight = $this->_rule_weights[$partial_key . '.*'];
}
$partial_key .= '.' . array_shift($fragments);
}
return $weight;
}