src/Kunstmaan/MultiDomainBundle/DependencyInjection/KunstmaanMultiDomainExtension.php
private function getHostConfigurations($hosts)
    {
        $hostConfigurations = array();
        foreach ($hosts as $name => $settings) {
            $host = $settings['host'];
            // Set the key of the host as id.
            $hostConfigurations[$host]['id'] = $name;

            foreach ($settings as $setting => $data) {
                if ($setting === 'locales') {
                    $hostConfigurations[$host]['locales_extra'] = $this->getLocalesExtra($data);
                    $data = $this->getHostLocales($data);
                    $hostConfigurations[$host]['reverse_locales'] = array_flip($data);
                }
                $hostConfigurations[$host][$setting] = $data;
            }
        }

        return $hostConfigurations;
    }
private function getHostConfigurations($hosts)
    {
        $hostConfigurations = array();
        foreach ($hosts as $name => $settings) {
            $host = $settings['host'];
            // Set the key of the host as id.
            $hostConfigurations[$host]['id'] = $name;

            foreach ($settings as $setting => $data) {
                if ($setting === 'locales') {
                    $hostConfigurations[$host]['locales_extra'] = $this->getLocalesExtra($data);
                    $data = $this->getHostLocales($data);
                    $hostConfigurations[$host]['reverse_locales'] = array_flip($data);
                }
                $hostConfigurations[$host][$setting] = $data;
            }
        }

        return $hostConfigurations;
    }
private function getHostConfigurations ( $ hosts ) { $ hostConfigurations = array ( ) ; foreach ( $ hosts as $ name => $ settings ) { $ host = $ settings [ 'host' ] ; // Set the key of the host as id. $ hostConfigurations [ $ host ] [ 'id' ] = $ name ; foreach ( $ settings as $ setting => $ data ) { if ( $ setting === 'locales' ) { $ hostConfigurations [ $ host ] [ 'locales_extra' ] = $ this -> getLocalesExtra ( $ data ) ; $ data = $ this -> getHostLocales ( $ data ) ; $ hostConfigurations [ $ host ] [ 'reverse_locales' ] = array_flip ( $ data ) ; } $ hostConfigurations [ $ host ] [ $ setting ] = $ data ; } } return $ hostConfigurations ; }
Convert config hosts array to a usable format

@param $hosts

@return array
Convert config hosts array to a usable format