protected function getRoutesFromConfiguration(array $configuration)
    {
        // Result
        $routes = [];

        // Convert routes to same context as from presenter
        foreach ($configuration as $route => $config) {

            // Check for method and set DEFAULT to GET if not set
            if (isset($config->methods) && null !== $config->methods) {
                $methods = explode(',', $config->methods);
            } else {
                $methods = [Doozr_Http::REQUEST_METHOD_GET];
            }

            foreach ($methods as $method) {
                if (false === isset($routes[$method])) {
                    $routes[$method] = [];
                }
                $config->route           = $route;
                $routes[$method][$route] = $config;
            }
        }

        return $routes;
    }
protected function getRoutesFromConfiguration(array $configuration)
    {
        // Result
        $routes = [];

        // Convert routes to same context as from presenter
        foreach ($configuration as $route => $config) {

            // Check for method and set DEFAULT to GET if not set
            if (isset($config->methods) && null !== $config->methods) {
                $methods = explode(',', $config->methods);
            } else {
                $methods = [Doozr_Http::REQUEST_METHOD_GET];
            }

            foreach ($methods as $method) {
                if (false === isset($routes[$method])) {
                    $routes[$method] = [];
                }
                $config->route           = $route;
                $routes[$method][$route] = $config;
            }
        }

        return $routes;
    }
protected function getRoutesFromConfiguration ( array $ configuration ) { // Result $ routes = [ ] ; // Convert routes to same context as from presenter foreach ( $ configuration as $ route => $ config ) { // Check for method and set DEFAULT to GET if not set if ( isset ( $ config -> methods ) && null !== $ config -> methods ) { $ methods = explode ( ',' , $ config -> methods ) ; } else { $ methods = [ Doozr_Http :: REQUEST_METHOD_GET ] ; } foreach ( $ methods as $ method ) { if ( false === isset ( $ routes [ $ method ] ) ) { $ routes [ $ method ] = [ ] ; } $ config -> route = $ route ; $ routes [ $ method ] [ $ route ] = $ config ; } } return $ routes ; }
Retrieves routes from configuration in same format as from presenters.

@param array $configuration The configuration to parse.

@author Benjamin Carl <opensource@clickalicious.de>

@return array The prepared/processed result
Retrieves routes from configuration in same format as from presenters .