You are here

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

Gets a local weight map with a prefix. E.g. if the config contains a weight setting "crumbs.nodeParent.* = 5", then in a local weight map with prefix "crumbs", this will be available as "nodeParent.* = 5".

Parameters

string $prefix: The prefix.

Return value

self The local weight map.

See also

crumbs_Container_WildcardData::prefixedContainer()

File

lib/Container/WeightMap.php, line 60

Class

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

Code

function localWeightMap($prefix) {
  if (!isset($this->localWeightMaps[$prefix])) {
    $data = $this
      ->buildPrefixedData($prefix);
    $this->localWeightMaps[$prefix] = new self($data);
  }
  return $this->localWeightMaps[$prefix];
}