public function import(array $arr, $prefix = null)
    {
        $imports = [];
        foreach ($arr as $key => $node) {
            if (strpos($key, 'import') === 0) {
                $mode = substr($key, 7);
                if ($mode == '' || $mode == $this->mode) {
                    $imports = array_merge($imports, $node);
                }

                continue;
            }

            $this->storage[$key] = $this->merge($this->storage[$key], $this->applyPrefix($node, $prefix));
        }

        foreach ($imports as $node) {
            $this->import($node, $prefix);

        }

        return $this;
    }
public function import(array $arr, $prefix = null)
    {
        $imports = [];
        foreach ($arr as $key => $node) {
            if (strpos($key, 'import') === 0) {
                $mode = substr($key, 7);
                if ($mode == '' || $mode == $this->mode) {
                    $imports = array_merge($imports, $node);
                }

                continue;
            }

            $this->storage[$key] = $this->merge($this->storage[$key], $this->applyPrefix($node, $prefix));
        }

        foreach ($imports as $node) {
            $this->import($node, $prefix);

        }

        return $this;
    }
public function import ( array $ arr , $ prefix = null ) { $ imports = [ ] ; foreach ( $ arr as $ key => $ node ) { if ( strpos ( $ key , 'import' ) === 0 ) { $ mode = substr ( $ key , 7 ) ; if ( $ mode == '' || $ mode == $ this -> mode ) { $ imports = array_merge ( $ imports , $ node ) ; } continue ; } $ this -> storage [ $ key ] = $ this -> merge ( $ this -> storage [ $ key ] , $ this -> applyPrefix ( $ node , $ prefix ) ) ; } foreach ( $ imports as $ node ) { $ this -> import ( $ node , $ prefix ) ; } return $ this ; }
Reads configuration properties from passed array

@param array       $arr
@param null|string $prefix

@return $this
Reads configuration properties from passed array