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;
    }