protected function storeRoute(array $methods, array $route)
    {
        $this->callbacks[] = (object)$route;
        $index             = count($this->callbacks) - 1;

        if (!isset($this->routes[$route['pattern']])) {
            $this->routes[$route['pattern']] = [];
        }

        if ($route['name']) {
            $this->names[$route['name']] = $index;
        }

        foreach ($methods as $method) {
            $this->routes[$route['pattern']][strtoupper($method)] = $index;
        }
    }
protected function storeRoute(array $methods, array $route)
    {
        $this->callbacks[] = (object)$route;
        $index             = count($this->callbacks) - 1;

        if (!isset($this->routes[$route['pattern']])) {
            $this->routes[$route['pattern']] = [];
        }

        if ($route['name']) {
            $this->names[$route['name']] = $index;
        }

        foreach ($methods as $method) {
            $this->routes[$route['pattern']][strtoupper($method)] = $index;
        }
    }
protected function storeRoute ( array $ methods , array $ route ) { $ this -> callbacks [ ] = ( object ) $ route ; $ index = count ( $ this -> callbacks ) - 1 ; if ( ! isset ( $ this -> routes [ $ route [ 'pattern' ] ] ) ) { $ this -> routes [ $ route [ 'pattern' ] ] = [ ] ; } if ( $ route [ 'name' ] ) { $ this -> names [ $ route [ 'name' ] ] = $ index ; } foreach ( $ methods as $ method ) { $ this -> routes [ $ route [ 'pattern' ] ] [ strtoupper ( $ method ) ] = $ index ; } }
Store a route in the route collection

@param  array $methods
@param  array $route
Store a route in the route collection