src/Core/Route/RouteProvider.php
public function setRoutes() : void
    {
        if (is_null($this->routes)) {
            $this->routes = [];
            $routesConfig = $this->config->getParam('routes') ?? [];
            foreach ($routesConfig as $routeName => $routeArr) {
                $route = new Route(
                    $routeName,
                    $routeArr['methods'],
                    $routeArr['path'],
                    $routeArr['params_defaults'],
                    $routeArr['params_requirements'],
                    $routeArr['handler'],
                    $routeArr['handler_method'] ?? null
                );
                $this->routes[] = $route;
            }
        }
    }
public function setRoutes() : void
    {
        if (is_null($this->routes)) {
            $this->routes = [];
            $routesConfig = $this->config->getParam('routes') ?? [];
            foreach ($routesConfig as $routeName => $routeArr) {
                $route = new Route(
                    $routeName,
                    $routeArr['methods'],
                    $routeArr['path'],
                    $routeArr['params_defaults'],
                    $routeArr['params_requirements'],
                    $routeArr['handler'],
                    $routeArr['handler_method'] ?? null
                );
                $this->routes[] = $route;
            }
        }
    }
public function setRoutes ( ) : void { if ( is_null ( $ this -> routes ) ) { $ this -> routes = [ ] ; $ routesConfig = $ this -> config -> getParam ( 'routes' ) ?? [ ] ; foreach ( $ routesConfig as $ routeName => $ routeArr ) { $ route = new Route ( $ routeName , $ routeArr [ 'methods' ] , $ routeArr [ 'path' ] , $ routeArr [ 'params_defaults' ] , $ routeArr [ 'params_requirements' ] , $ routeArr [ 'handler' ] , $ routeArr [ 'handler_method' ] ?? null ) ; $ this -> routes [ ] = $ route ; } } }
Sets \Duktig\Core\Route\Route objects from config values
Sets \ Duktig \ Core \ Route \ Route objects from config values