private function searchRouter($routes)
    {
        foreach ($routes as $route) {
            if ($route['controller'] === null
              || !preg_match_all('#^' . $route['request'] . '$#',
                    $this->request,
                    $matches,
                    PREG_SET_ORDER)
                  ) {
                continue;
            }
            $route['params'] = array_slice($matches[0], 1);
            return $route;
        }
        //não existe rotas
        return false;
    }
private function searchRouter($routes)
    {
        foreach ($routes as $route) {
            if ($route['controller'] === null
              || !preg_match_all('#^' . $route['request'] . '$#',
                    $this->request,
                    $matches,
                    PREG_SET_ORDER)
                  ) {
                continue;
            }
            $route['params'] = array_slice($matches[0], 1);
            return $route;
        }
        //não existe rotas
        return false;
    }
private function searchRouter ( $ routes ) { foreach ( $ routes as $ route ) { if ( $ route [ 'controller' ] === null || ! preg_match_all ( '#^' . $ route [ 'request' ] . '$#' , $ this -> request , $ matches , PREG_SET_ORDER ) ) { continue ; } $ route [ 'params' ] = array_slice ( $ matches [ 0 ] , 1 ) ; return $ route ; } //não existe rotas return false ; }
Search for valide router

@params
Search for valide router