Ejemplo n.º 1
0
 public function putAll(IMap $map)
 {
     $items = $map->toArray();
     foreach ($items as $key => $value) {
         $this->put($key, $value);
     }
 }
Ejemplo n.º 2
0
 /**
  * @param string $key
  * @param IMap $map
  * @param IConfigLoader $loader
  */
 public static function searchFor($key, IMap $map, IConfigLoader $loader)
 {
     $keyPath = self::getPathForKey($key);
     $length = count($keyPath);
     while ($length-- > 0) {
         $path = implode(DIRECTORY_SEPARATOR, $keyPath);
         if ($loader->tryLoad($path) && $map->has($key)) {
             break;
         }
         array_pop($keyPath);
     }
 }