Example #1
0
 private function ClassExisted()
 {
     $Fichier = $this->controller . 'Controller';
     if (class_exists('\\Controllers\\' . $Fichier . '\\' . $this->controller)) {
         $ClassFull = '\\Controllers\\' . $Fichier . '\\' . $this->controller;
         $this->classOn = new $ClassFull();
     } else {
         if ($this->modules) {
             if (class_exists('\\Module\\Controllers\\' . $Fichier . '\\' . $this->controller)) {
                 $ClassFull = '\\Module\\Controllers\\' . $Fichier . '\\' . $this->controller;
                 $this->classOn = new $ClassFull();
             } else {
                 if ($this->ErrorPage == FALSE) {
                     // Aucune route trouvée
                     $this->ErrorPage = 'fichier';
                     require_once 'ErrorPageController.class.php';
                     $ErrorPage = new ErrorPage();
                     return $ErrorPage->PageNoFichier();
                 }
             }
         }
     }
 }