You are here

function crumbs_Container_WeightMap::findBestCandidateKey in Crumbs, the Breadcrumbs suite 7.2

Parameters

mixed[] $candidates: Format: $[$candidateKey] = $candidateValue

Return value

string|null The candidate key with the smallest weight, or NULL if none found.

File

lib/Container/WeightMap.php, line 102

Class

crumbs_Container_WeightMap
Can determine a weight for a rule key based on wildcard weights.

Code

function findBestCandidateKey(array $candidates) {
  $bestKey = NULL;
  $bestWeight = NULL;
  $this
    ->findBetterCandidateKey($bestKey, $bestWeight, $candidates);
  return $bestKey;
}