private function loadRoute(App $slim, $name, array $details)
    {
        $methods = $this->methods($details);
        $pattern = $this->nullable('route', $details);
        $stack = $this->nullable('stack', $details) ?: [];

        $controller = array_pop($stack);

        $route = $slim->map($methods, $pattern, $controller);
        $route->setName($name);

        while ($middleware = array_pop($stack)) {
            $route->add($middleware);
        }

        return $route;
    }
private function loadRoute(App $slim, $name, array $details)
    {
        $methods = $this->methods($details);
        $pattern = $this->nullable('route', $details);
        $stack = $this->nullable('stack', $details) ?: [];

        $controller = array_pop($stack);

        $route = $slim->map($methods, $pattern, $controller);
        $route->setName($name);

        while ($middleware = array_pop($stack)) {
            $route->add($middleware);
        }

        return $route;
    }
private function loadRoute ( App $ slim , $ name , array $ details ) { $ methods = $ this -> methods ( $ details ) ; $ pattern = $ this -> nullable ( 'route' , $ details ) ; $ stack = $ this -> nullable ( 'stack' , $ details ) ? : [ ] ; $ controller = array_pop ( $ stack ) ; $ route = $ slim -> map ( $ methods , $ pattern , $ controller ) ; $ route -> setName ( $ name ) ; while ( $ middleware = array_pop ( $ stack ) ) { $ route -> add ( $ middleware ) ; } return $ route ; }
Load a route into the application.

@param App $slim
@param string $name
@param array $details

@return RouteInterface
Load a route into the application .