src/Comodojo/Dispatcher/Router/Table.php
private function registerRoute($folders, $type, $class = null, array $parameters = []) {

        // The values associated with a route are as follows:
        // $route = new Route($this->router);
        $route = new Route();

        $this->updateRoute($route, $type, $class, $parameters);

        // $route->setType($type) // Type of route
        //     ->setClassName($class) // Class to be invoked
        //     ->setParameters($parameters); // Parameters passed via the composer.json configuration (cache, ttl, etc...)

        $this->logger->debug("Route table - route: ".implode("/", $folders));

        // This method generate a global regular expression which will be able to match all the URI supported by the route
        $regex = $this->parser->read($folders, $route);

        $this->logger->debug("Route table - route regex: $regex");

        $this->routes = array_merge($this->routes, [$regex => $route]);

    }
private function registerRoute($folders, $type, $class = null, array $parameters = []) {

        // The values associated with a route are as follows:
        // $route = new Route($this->router);
        $route = new Route();

        $this->updateRoute($route, $type, $class, $parameters);

        // $route->setType($type) // Type of route
        //     ->setClassName($class) // Class to be invoked
        //     ->setParameters($parameters); // Parameters passed via the composer.json configuration (cache, ttl, etc...)

        $this->logger->debug("Route table - route: ".implode("/", $folders));

        // This method generate a global regular expression which will be able to match all the URI supported by the route
        $regex = $this->parser->read($folders, $route);

        $this->logger->debug("Route table - route regex: $regex");

        $this->routes = array_merge($this->routes, [$regex => $route]);

    }
private function registerRoute ( $ folders , $ type , $ class = null , array $ parameters = [ ] ) { // The values associated with a route are as follows: // $route = new Route($this->router); $ route = new Route ( ) ; $ this -> updateRoute ( $ route , $ type , $ class , $ parameters ) ; // $route->setType($type) // Type of route //     ->setClassName($class) // Class to be invoked //     ->setParameters($parameters); // Parameters passed via the composer.json configuration (cache, ttl, etc...) $ this -> logger -> debug ( "Route table - route: " . implode ( "/" , $ folders ) ) ; // This method generate a global regular expression which will be able to match all the URI supported by the route $ regex = $ this -> parser -> read ( $ folders , $ route ) ; $ this -> logger -> debug ( "Route table - route regex: $regex" ) ; $ this -> routes = array_merge ( $ this -> routes , [ $ regex => $ route ] ) ; }
This method add a route to the supported list
This method add a route to the supported list