public function setup()
    {
        $this->groupRoutes();

        foreach ($this->routes as $type => $routes) {
            foreach ($routes as $name => $route) {
                $newRoute = new Route($name, $route);
                if (!$newRoute->hasParam('hostname')) {
                    $newRoute->setParam('hostname', $this->resolveDefaultHostName());
                }

                $routeType = $this->resolveRouteType($type);
                $routeType->add($this->getRouter(), $newRoute);
            }
        }
    }
public function setup()
    {
        $this->groupRoutes();

        foreach ($this->routes as $type => $routes) {
            foreach ($routes as $name => $route) {
                $newRoute = new Route($name, $route);
                if (!$newRoute->hasParam('hostname')) {
                    $newRoute->setParam('hostname', $this->resolveDefaultHostName());
                }

                $routeType = $this->resolveRouteType($type);
                $routeType->add($this->getRouter(), $newRoute);
            }
        }
    }
public function setup ( ) { $ this -> groupRoutes ( ) ; foreach ( $ this -> routes as $ type => $ routes ) { foreach ( $ routes as $ name => $ route ) { $ newRoute = new Route ( $ name , $ route ) ; if ( ! $ newRoute -> hasParam ( 'hostname' ) ) { $ newRoute -> setParam ( 'hostname' , $ this -> resolveDefaultHostName ( ) ) ; } $ routeType = $ this -> resolveRouteType ( $ type ) ; $ routeType -> add ( $ this -> getRouter ( ) , $ newRoute ) ; } } }
Setups router
Adds rules to router
Setups router Adds rules to router