public function add($uri, $method, $controller, $action) {
        $this->currentRoute = [
            'uri' => $uri,
            'method' => $method,
            'controller' => $controller,
            'action' => $action,
            'module' => $this->module,
        ];

        if ($this->currentGroupName) {
            $this->virtualRoutes[$this->currentGroupName][] = $this->currentRoute;
        } else {
            $this->virtualRoutes['*'][] = $this->currentRoute;
        }

        return $this;
    }
public function add($uri, $method, $controller, $action) {
        $this->currentRoute = [
            'uri' => $uri,
            'method' => $method,
            'controller' => $controller,
            'action' => $action,
            'module' => $this->module,
        ];

        if ($this->currentGroupName) {
            $this->virtualRoutes[$this->currentGroupName][] = $this->currentRoute;
        } else {
            $this->virtualRoutes['*'][] = $this->currentRoute;
        }

        return $this;
    }
public function add ( $ uri , $ method , $ controller , $ action ) { $ this -> currentRoute = [ 'uri' => $ uri , 'method' => $ method , 'controller' => $ controller , 'action' => $ action , 'module' => $ this -> module , ] ; if ( $ this -> currentGroupName ) { $ this -> virtualRoutes [ $ this -> currentGroupName ] [ ] = $ this -> currentRoute ; } else { $ this -> virtualRoutes [ '*' ] [ ] = $ this -> currentRoute ; } return $ this ; }
Adds new route entry to routes

@param string $uri
@param string $method
@param string $controller
@param string $action
@param array $middlewares
@return $this
Adds new route entry to routes