protected function sanitize(array $configuration)
    {
        foreach ($configuration as $key => $config) {
            if (null === $config['name']) {
                $configuration[$key]['name'] = $this->defaultRouteName($key);
            }
            if (null === $config['path']) {
                $configuration[$key]['path'] = $this->defaultRoutePath($key);
            }
            if (null === $config['api_name']) {
                $configuration[$key]['api_name'] = $this->defaultApiRouteName($key);
            }
            if (null === $config['api_path']) {
                $configuration[$key]['api_path'] = $this->defaultApiRoutePath($key);
            }
        }

        return $configuration;
    }
protected function sanitize(array $configuration)
    {
        foreach ($configuration as $key => $config) {
            if (null === $config['name']) {
                $configuration[$key]['name'] = $this->defaultRouteName($key);
            }
            if (null === $config['path']) {
                $configuration[$key]['path'] = $this->defaultRoutePath($key);
            }
            if (null === $config['api_name']) {
                $configuration[$key]['api_name'] = $this->defaultApiRouteName($key);
            }
            if (null === $config['api_path']) {
                $configuration[$key]['api_path'] = $this->defaultApiRoutePath($key);
            }
        }

        return $configuration;
    }
protected function sanitize ( array $ configuration ) { foreach ( $ configuration as $ key => $ config ) { if ( null === $ config [ 'name' ] ) { $ configuration [ $ key ] [ 'name' ] = $ this -> defaultRouteName ( $ key ) ; } if ( null === $ config [ 'path' ] ) { $ configuration [ $ key ] [ 'path' ] = $ this -> defaultRoutePath ( $ key ) ; } if ( null === $ config [ 'api_name' ] ) { $ configuration [ $ key ] [ 'api_name' ] = $ this -> defaultApiRouteName ( $ key ) ; } if ( null === $ config [ 'api_path' ] ) { $ configuration [ $ key ] [ 'api_path' ] = $ this -> defaultApiRoutePath ( $ key ) ; } } return $ configuration ; }
Sanitizes and validates the given configuration tree.

@param array $configuration The configuration tree

@return array
Sanitizes and validates the given configuration tree .