You are here

function crumbs_Container_WildcardData::getAllMerged in Crumbs, the Breadcrumbs suite 7.2

If the values are arrays, then this one merges the array values for the key and all wildcard parents.

Parameters

string $key: The key

Return value

array The merged arrays, e.g. Starting from aaa.bbb.ccc.ddd => array(5, 55) aaa.bbb.ccc.* => array(77) aaa.* => array(21)

Merged: array(5, 55, 77, 21, 9, 99, 999)

File

lib/Container/WildcardData.php, line 71

Class

crumbs_Container_WildcardData

Code

function getAllMerged($key) {
  $merged = array();
  foreach ($this
    ->getAll($key) as $values) {
    if (is_array($values)) {
      $merged = array_merge($merged, $values);
    }
  }
  return $merged;
}