Esempio n. 1
0
 /**
  * Expands flat array to multi-dimensional associative array
  * using keys names as paths.
  *
  * @param  array      $flatten
  *
  * @return array
  */
 public static function expand(array $flatten)
 {
     $nested = array();
     foreach ($flatten as $path => $value) {
         ArrayUtils::set($nested, $path, $value);
     }
     return $nested;
 }