protected function checkContainer(int $method, string $uri)
    {
        while (($route = $this->routes->next()) !== false) {
            if (($route->method & $method) !== $method) {
                continue;
            }

            if (preg_match_all($this->posix2Pcre($route->uri), $uri, $matches) === 0) {
                continue;
            }

            $this->logger->info("Route match found");
            if (is_array($matches)) {
                $this->addParams($matches);
            }

            return $route;
        }
        return null;
    }
protected function checkContainer(int $method, string $uri)
    {
        while (($route = $this->routes->next()) !== false) {
            if (($route->method & $method) !== $method) {
                continue;
            }

            if (preg_match_all($this->posix2Pcre($route->uri), $uri, $matches) === 0) {
                continue;
            }

            $this->logger->info("Route match found");
            if (is_array($matches)) {
                $this->addParams($matches);
            }

            return $route;
        }
        return null;
    }
protected function checkContainer ( int $ method , string $ uri ) { while ( ( $ route = $ this -> routes -> next ( ) ) !== false ) { if ( ( $ route -> method & $ method ) !== $ method ) { continue ; } if ( preg_match_all ( $ this -> posix2Pcre ( $ route -> uri ) , $ uri , $ matches ) === 0 ) { continue ; } $ this -> logger -> info ( "Route match found" ) ; if ( is_array ( $ matches ) ) { $ this -> addParams ( $ matches ) ; } return $ route ; } return null ; }
Check Routes Container

Iterates the routes container and tries to match the request to a Route in
the container. Returns the matching Route object if found, or null otherwise.

@param int $method Request Method
@param string $uri Request Uri
@return \SlaxWeb\Router\Route|null
Check Routes Container