routeList[$route] = $page; } //fonction de recherche d'une route par rapport a un texte //return function public function search($path) { foreach ($this->routeList as $reg => $page) { if(preg_match($reg, $path)) { return $page; } } return function () { return file_get_contents("../html/404.html"); }; } }