protected static function addLocalConfiguration($componentDirectory, array $component)
    {
        $component['local']   = [];
        $componentDirectories = [];
        for ($dir = 0; $dir < count($component['path']); ++$dir) {
            $componentDirectory = $componentDirectories[] = dirname($componentDirectory);
        }

        foreach (array_reverse($componentDirectories) as $componentDirectory) {
            $component['local'][] = self::getLocalConfiguration($componentDirectory);
        }

        return $component;
    }
protected static function addLocalConfiguration($componentDirectory, array $component)
    {
        $component['local']   = [];
        $componentDirectories = [];
        for ($dir = 0; $dir < count($component['path']); ++$dir) {
            $componentDirectory = $componentDirectories[] = dirname($componentDirectory);
        }

        foreach (array_reverse($componentDirectories) as $componentDirectory) {
            $component['local'][] = self::getLocalConfiguration($componentDirectory);
        }

        return $component;
    }
protected static function addLocalConfiguration ( $ componentDirectory , array $ component ) { $ component [ 'local' ] = [ ] ; $ componentDirectories = [ ] ; for ( $ dir = 0 ; $ dir < count ( $ component [ 'path' ] ) ; ++ $ dir ) { $ componentDirectory = $ componentDirectories [ ] = dirname ( $ componentDirectory ) ; } foreach ( array_reverse ( $ componentDirectories ) as $ componentDirectory ) { $ component [ 'local' ] [ ] = self :: getLocalConfiguration ( $ componentDirectory ) ; } return $ component ; }
Amend the directory specific local configuration

@param string $componentDirectory Component directory
@param array $component           Component

@return array Amended component
Amend the directory specific local configuration