/**
  * Initialize the ConfirmAddController class and their parents
  */
 public function init()
 {
     try {
         parent::init();
     } catch (Exception $e) {
         throw new Exception('Une erreur est survenue durant le chargement du module: ' . $e->getMessage());
     }
     if (file_exists(_CONTROLLERS_DIR_ . '/Tools.php')) {
         $url = Tools::getInstance()->request_url;
         $url .= '&id=ukn';
         $controller = Tools::getInstance()->getUrl_controller($url);
         if ($controller == 'ConfirmAddController') {
             if (file_exists(_CARAVANS_MODELS_ . '/' . $this->model_name . 'Model.php')) {
                 try {
                     require_once _CARAVANS_MODELS_ . '/' . $this->model_name . 'Model.php';
                     Tools::getInstance()->createPost($_POST);
                     if (!empty($_POST['name']) && !empty($_POST['price']) && !empty($_POST['person']) && !empty($_POST['location'])) {
                         \Caravan\RentingModel::getInstance()->renting_caravan($_POST['name'], $_POST['price'], $_POST['person'], $_POST['location']);
                         header('Location: /Cas-M-Ping/caravans/show/all');
                     } else {
                         header('Location: /Cas-M-Ping/caravans/renting');
                     }
                 } catch (Exception $e) {
                     throw new Exception('Une erreur est survenue durant la modification des données: ' . $e->getMessage());
                 }
             } else {
                 throw new Exception('Le modèle "' . $this->model_name . '" n\'existe pas dans "' . _CARAVANS_MODELS_ . '"!');
             }
         } else {
             throw new Exception('Une erreur est survenue durant la phase de routage!');
         }
     } else {
         throw new Exception('L\'URL n\'est pas évaluable!');
     }
 }
 /**
  * Initialize the AddController class and their parents
  */
 public function init()
 {
     try {
         parent::init();
     } catch (Exception $e) {
         throw new Exception('Une erreur est survenue durant le chargement du module: ' . $e->getMessage());
     }
     if (file_exists(_CONTROLLERS_DIR_ . '/Tools.php')) {
         $url = Tools::getInstance()->request_url;
         $url .= '&id=ukn';
         $controller = Tools::getInstance()->getUrl_controller($url);
         if ($controller == 'AddController') {
             if (file_exists(_SEASONS_VIEWS_ . '/' . $this->view_name . '.tpl')) {
                 try {
                     echo $this->twig->render($this->view_name . '.tpl', array('bootstrapPath' => _BOOTSTRAP_FILE_));
                 } catch (Exception $e) {
                     throw new Exception('Une erreur est survenue durant l\'affichage des données: ' . $e->getMessage());
                 }
             } else {
                 throw new Exception('Le template "' . $this->view_name . '" n\'existe pas dans "' . _SEASONS_VIEWS_ . '"!');
             }
         } else {
             throw new Exception('Une erreur est survenue durant la phase de routage!');
         }
     } else {
         throw new Exception('L\'URL n\'est pas évaluable!');
     }
 }
 /**
  * Initialize the ModifyController class and their parents
  */
 public function init()
 {
     try {
         parent::init();
     } catch (Exception $e) {
         throw new Exception('Une erreur est survenue durant le chargement du module: ' . $e->getMessage());
     }
     if (file_exists(_CONTROLLERS_DIR_ . '/Tools.php')) {
         $url = Tools::getInstance()->request_url;
         $controller = Tools::getInstance()->getUrl_controller($url);
         if ($controller == 'ModifyController') {
             if (file_exists(_RENTALS_MODELS_ . '/' . $this->model_name . 'Model.php')) {
                 if (file_exists(_RENTALS_VIEWS_ . '/' . $this->view_name . '.tpl')) {
                     try {
                         require_once _RENTALS_MODELS_ . '/' . $this->model_name . 'Model.php';
                         $id = Tools::getInstance()->getUrl_id($url);
                         $data = \Rental\DisplayModel::getInstance()->display_rental($id);
                         echo $this->twig->render($this->view_name . '.tpl', array('rental' => $data[0], 'bootstrapPath' => _BOOTSTRAP_FILE_));
                     } catch (Exception $e) {
                         throw new Exception('Une erreur est survenue durant la récupération des données: ' . $e->getMessage());
                     }
                 } else {
                     throw new Exception('Le template "' . $this->view_name . '" n\'existe pas dans "' . _RENTALS_VIEWS_ . '"!');
                 }
             } else {
                 throw new Exception('Le modèle "' . $this->model_name . '" n\'existe pas dans "' . _RENTALS_MODELS_ . '"!');
             }
         } else {
             throw new Exception('Une erreur est survenue durant la phase de routage!');
         }
     } else {
         throw new Exception('L\'URL n\'est pas évaluable!');
     }
 }
 /**
  * Initialize the ConfirmModifyController class and their parents
  */
 public function init()
 {
     try {
         parent::init();
     } catch (Exception $e) {
         throw new Exception('Une erreur est survenue durant le chargement du module: ' . $e->getMessage());
     }
     if (file_exists(_CONTROLLERS_DIR_ . '/Tools.php')) {
         $url = Tools::getInstance()->request_url;
         $controller = Tools::getInstance()->getUrl_controller($url);
         if ($controller == 'ConfirmModifyController') {
             if (file_exists(_SECTORS_MODELS_ . '/' . $this->model_name . 'Model.php')) {
                 try {
                     require_once _SECTORS_MODELS_ . '/' . $this->model_name . 'Model.php';
                     $id = Tools::getInstance()->getUrl_id($url);
                     Tools::getInstance()->createPost($_POST);
                     if (!empty($_POST['sec_name'])) {
                         \Sector\ModifyModel::getInstance()->modify_sector($id, $_POST['sec_name']);
                         header('Location: /Cas-M-Ping/sectors/show/' . $id);
                     } else {
                         header('Location: /Cas-M-Ping/sectors/modify/' . $id);
                     }
                 } catch (Exception $e) {
                     throw new Exception('Une erreur est survenue durant la modification des données: ' . $e->getMessage());
                 }
             } else {
                 throw new Exception('Le modèle "' . $this->model_name . '" n\'existe pas dans "' . _SECTORS_MODELS_ . '"!');
             }
         } else {
             throw new Exception('Une erreur est survenue durant la phase de routage!');
         }
     } else {
         throw new Exception('L\'URL n\'est pas évaluable!');
     }
 }
 /**
  * Initialize the DisplayController class and their parents
  */
 public function init()
 {
     try {
         parent::init();
     } catch (Exception $e) {
         throw new Exception('Une erreur est survenue durant le chargement du module: ' . $e->getMessage());
     }
     if (file_exists(_CONTROLLERS_DIR_ . '/Tools.php')) {
         $url = Tools::getInstance()->request_url;
         $controller = Tools::getInstance()->getUrl_controller($url);
         if ($controller == 'DisplayController') {
             if (file_exists(_SECTORS_MODELS_ . '/' . $this->model_name . 'Model.php') && file_exists(_LOCATIONS_MODELS_ . '/' . $this->model_name . 'Model.php')) {
                 if (file_exists(_SECTORS_VIEWS_ . '/' . $this->view_name . '.tpl')) {
                     try {
                         require_once _SECTORS_MODELS_ . '/' . $this->model_name . 'Model.php';
                         require_once _LOCATIONS_MODELS_ . '/' . $this->model_name . 'Model.php';
                         $id = Tools::getInstance()->getUrl_id($url);
                         switch ($id) {
                             case 'all':
                                 $sectors = \Sector\DisplayModel::getInstance()->display_sectors();
                                 $locations = \Location\DisplayModel::getInstance()->display_locationAll();
                                 break;
                             default:
                                 if (\Sector\DisplayModel::getInstance()->has_sector($id) == 1) {
                                     $data = \Sector\DisplayModel::getInstance()->display_sector($id);
                                     $sectors = \Sector\DisplayModel::getInstance()->display_sector($id);
                                     $locations = \Location\DisplayModel::getInstance()->display_locationAll();
                                 } else {
                                     header('Location: /Cas-M-Ping/errors/404');
                                 }
                                 break;
                         }
                         echo $this->twig->render($this->view_name . '.tpl', array('sectors' => $sectors, 'locations' => $locations, 'bootstrapPath' => _BOOTSTRAP_FILE_));
                     } catch (Exception $e) {
                         throw new Exception('Une erreur est survenue durant la récupération des données: ' . $e->getMessage());
                     }
                 } else {
                     throw new Exception('Le template "' . $this->view_name . '" n\'existe pas dans "' . _SECTORS_VIEWS_ . '"!');
                 }
             } else {
                 throw new Exception('Le modèle "' . $this->model_name . '" n\'existe pas dans "' . _SECTORS_MODELS_ . '"!');
             }
         } else {
             throw new Exception('Une erreur est survenue durant la phase de routage!');
         }
     } else {
         throw new Exception('L\'URL n\'est pas évaluable!');
     }
 }
 /**
  * Find the controller and instantiate it
  */
 public function dispatch()
 {
     try {
         Dispatcher::get_requestUri();
         foreach ($this->routes as $key => $value) {
             if (Dispatcher::hasRoute($this->routes[$key]['url-formatter'])) {
                 $this->controller['directory'] = $this->routes[$key]['directory'];
                 $this->controller['controller'] = $this->routes[$key]['controller'];
                 $this->controller['formatter'] = $this->routes[$key]['url-formatter'];
                 break;
             }
         }
         if ($this->request_uri == null) {
             header('Location: /' . _PROJECT_NAME_ . '/lecons/show/all');
         }
         if ($this->controller == null) {
             $this->controller['directory'] = $this->routes['404-errors']['directory'];
             $this->controller['controller'] = $this->routes['404-errors']['controller'];
             $this->controller['formatter'] = $this->routes['404-errors']['url-formatter'];
         }
         if (file_exists(_CONTROLLERS_DIR_ . '/Tools.php')) {
             require_once _CONTROLLERS_DIR_ . '/Tools.php';
         } else {
             throw new Exception('Fichier "' . _CONTROLLERS_DIR_ . '/Tool.php" introuvable!');
         }
         if (file_exists(_CONTROLLERS_DIR_ . '/' . $this->controller['directory'] . $this->controller['controller'] . '.php')) {
             require_once _CONTROLLERS_DIR_ . '/' . $this->controller['directory'] . $this->controller['controller'] . '.php';
         } else {
             throw new Exception('Fichier "' . _CONTROLLERS_DIR_ . '/' . $this->controller['directory'] . $this->controller['controller'] . '.php" introuvable!');
         }
         Tools::getInstance()->createPost($_POST);
         Tools::getInstance()->createUrl($this->controller['controller'], $this->request_uri);
         $controllerInstance = new $this->controller['controller']();
         if (!$controllerInstance->checkAccess() || !$controllerInstance->viewAccess()) {
             $this->controller['directory'] = $this->routes['403-errors']['directory'];
             $this->controller['controller'] = $this->routes['403-errors']['controller'];
             $this->controller['formatter'] = $this->routes['403-errors']['url-formatter'];
             if (file_exists(_CONTROLLERS_DIR_ . '/' . $this->controller['directory'] . $this->controller['controller'] . '.php')) {
                 require_once _CONTROLLERS_DIR_ . '/' . $this->controller['directory'] . $this->controller['controller'] . '.php';
             } else {
                 throw new Exception('Fichier "' . _CONTROLLERS_DIR_ . '/' . $this->controller['directory'] . $this->controller['controller'] . '.php" introuvable!');
             }
             $controllerInstance = new $this->controller['controller']();
         }
     } catch (Exception $e) {
         throw new Exception('Une erreur est survenue durant la phase de routage: ' . $e->getMessage());
     }
 }
 /**
  * Initialize the ConfirmAddController class and their parents
  */
 public function init()
 {
     try {
         parent::init();
     } catch (Exception $e) {
         throw new Exception('Une erreur est survenue durant le chargement du module: ' . $e->getMessage());
     }
     if (file_exists(_CONTROLLERS_DIR_ . '/Tools.php')) {
         $url = Tools::getInstance()->request_url;
         $url .= '&id=ukn';
         $controller = Tools::getInstance()->getUrl_controller($url);
         if ($controller == 'ConfirmAddController') {
             if (file_exists(_RENTALS_MODELS_ . '/' . $this->model_nameDisplay . 'Model.php') && file_exists(_SEASONS_MODELS_ . '/' . $this->model_nameDisplay . 'Model.php') && file_exists(_LOCATIONS_MODELS_ . '/' . $this->model_nameDisplay . 'Model.php')) {
                 try {
                     require_once _RENTALS_MODELS_ . '/' . $this->model_nameDisplay . 'Model.php';
                     require_once _RENTALS_MODELS_ . '/' . $this->model_nameCreate . 'Model.php';
                     require_once _SEASONS_MODELS_ . '/' . $this->model_nameDisplay . 'Model.php';
                     require_once _LOCATIONS_MODELS_ . '/' . $this->model_nameDisplay . 'Model.php';
                     Tools::getInstance()->createPost($_POST);
                     $datetime1 = new DateTime($_POST['beginDate']);
                     $datetime2 = new DateTime($_POST['endDate']);
                     $interval = $datetime1->diff($datetime2);
                     if (!empty($_POST['rent_cust_id']) && !empty($_POST['rent_name']) && !empty($_POST['beginDate']) && !empty($_POST['location']) && !empty($_POST['endDate']) && !empty($_POST['person']) && !empty($_POST['price_c']) && !empty($_POST['val']) && $interval->days > 0) {
                         $date = \Season\displayModel::getInstance()->display_seasonCoeff($_POST['beginDate']);
                         $price = \Location\DisplayModel::getInstance()->display_location($_POST['location']);
                         $priceTT = $date[0]['seas_coeff'] * $price[0]['type_location_price'] * $interval->days + $_POST['price_c'];
                         \Rental\CreateModel::getInstance()->create_rental($_POST['rent_name'], $_POST['beginDate'], $_POST['endDate'], $_POST['person'], '', $_POST['price_c'], $interval->days, $priceTT, $_POST['rent_cust_id'], $_POST['val'], $_POST['location']);
                         header('Location: /Cas-M-Ping/rentals/show/all');
                     } else {
                         header('Location: /Cas-M-Ping/rentals/add');
                     }
                 } catch (Exception $e) {
                     throw new Exception('Une erreur est survenue durant l\'ajout des données: ' . $e->getMessage());
                 }
             } else {
                 throw new Exception('Le modèle "' . $this->model_nameDisplay . '" n\'existe pas dans "' . _RENTALS_MODELS_ . '"!');
             }
         } else {
             throw new Exception('Une erreur est survenue durant la phase de routage!');
         }
     } else {
         throw new Exception('L\'URL n\'est pas évaluable!');
     }
 }
 /**
  * Initialize the DeleteController class and their parents
  */
 public function init()
 {
     try {
         parent::init();
     } catch (Exception $e) {
         throw new Exception('Une erreur est survenue durant le chargement du module: ' . $e->getMessage());
     }
     if (file_exists(_CONTROLLERS_DIR_ . '/Tools.php')) {
         $url = Tools::getInstance()->request_url;
         $controller = Tools::getInstance()->getUrl_controller($url);
         if ($controller == 'DeleteController') {
             if (file_exists(_SEASONS_MODELS_ . '/' . $this->model_name . 'Model.php')) {
                 try {
                     require_once _SEASONS_MODELS_ . '/' . $this->model_name . 'Model.php';
                     $id = Tools::getInstance()->getUrl_id($url);
                     switch ($id) {
                         case 'all':
                             \Season\DeleteModel::getInstance()->delete_seasons();
                             break;
                         default:
                             if (\Season\DeleteModel::getInstance()->has_season($id) == 1) {
                                 \Season\DeleteModel::getInstance()->delete_season($id);
                             } else {
                                 header('Location: /Cas-M-Ping/errors/404');
                             }
                             break;
                     }
                     header('Location: /Cas-M-Ping/seasons/show/all');
                 } catch (Exception $e) {
                     throw new Exception('Une erreur est survenue durant la suppression des données: ' . $e->getMessage());
                 }
             } else {
                 throw new Exception('Le modèle "' . $this->model_name . '" n\'existe pas dans "' . _SEASONS_MODELS_ . '"!');
             }
         } else {
             throw new Exception('Une erreur est survenue durant la phase de routage!');
         }
     } else {
         throw new Exception('L\'URL n\'est pas évaluable!');
     }
 }
 /**
  * Initialize the ConfirmModifyController class and their parents
  */
 public function init()
 {
     try {
         parent::init();
     } catch (Exception $e) {
         throw new Exception('Une erreur est survenue durant le chargement du module: ' . $e->getMessage());
     }
     if (file_exists(_CONTROLLERS_DIR_ . '/Tools.php')) {
         $url = Tools::getInstance()->request_url;
         $controller = Tools::getInstance()->getUrl_controller($url);
         if ($controller == 'ConfirmModifyController') {
             if (file_exists(_SEASONS_MODELS_ . '/' . $this->model_name . 'Model.php')) {
                 try {
                     require_once _SEASONS_MODELS_ . '/' . $this->model_name . 'Model.php';
                     $id = Tools::getInstance()->getUrl_id($url);
                     $datetime1 = new DateTime($_POST['beginDate']);
                     $datetime2 = new DateTime($_POST['endDate']);
                     $interval = $datetime1->diff($datetime2);
                     Tools::getInstance()->createPost($_POST);
                     if (!empty($_POST['name']) && !empty($_POST['beginDate']) && !empty($_POST['endDate']) && !empty($_POST['coefficient'])) {
                         $_POST['coefficient'] = $_POST['coefficient'] > 1 ? 1 : $_POST['coefficient'];
                         $_POST['coefficient'] = $_POST['coefficient'] <= 0 ? 0.1 : $_POST['coefficient'];
                         \Season\ModifyModel::getInstance()->modify_season($id, $_POST['name'], $_POST['beginDate'], $_POST['endDate'], $_POST['coefficient']);
                         header('Location: /Cas-M-Ping/seasons/show/' . $id);
                     } else {
                         header('Location: /Cas-M-Ping/seasons/modify/' . $id);
                     }
                 } catch (Exception $e) {
                     throw new Exception('Une erreur est survenue durant la modification des données: ' . $e->getMessage());
                 }
             } else {
                 throw new Exception('Le modèle "' . $this->model_name . '" n\'existe pas dans "' . _SEASONS_MODELS_ . '"!');
             }
         } else {
             throw new Exception('Une erreur est survenue durant la phase de routage!');
         }
     } else {
         throw new Exception('L\'URL n\'est pas évaluable!');
     }
 }
 /**
  * Initialize the ModifyController class and their parents
  */
 public function init()
 {
     try {
         parent::init();
     } catch (Exception $e) {
         throw new Exception('Une erreur est survenue durant le chargement du module: ' . $e->getMessage());
     }
     if (file_exists(_CONTROLLERS_DIR_ . '/Tools.php')) {
         $url = Tools::getInstance()->request_url;
         $controller = Tools::getInstance()->getUrl_controller($url);
         if ($controller == 'ModifyController') {
             if (file_exists(_LOCATIONS_MODELS_ . '/' . $this->model_name . 'Model.php') && file_exists(_SECTORS_MODELS_ . '/' . $this->model_name . 'Model.php')) {
                 if (file_exists(_LOCATIONS_VIEWS_ . '/' . $this->view_name . '.tpl')) {
                     try {
                         require_once _LOCATIONS_MODELS_ . '/' . $this->model_name . 'Model.php';
                         require_once _SECTORS_MODELS_ . '/' . $this->model_name . 'Model.php';
                         $id = Tools::getInstance()->getUrl_id($url);
                         $sectors = \Sector\DisplayModel::getInstance()->display_sectors();
                         $type_locations = \Location\DisplayModel::getInstance()->display_TypeLocationModels();
                         $data = \Location\DisplayModel::getInstance()->display_location($id);
                         echo $this->twig->render($this->view_name . '.tpl', array('sectors' => $sectors, 'typeLocations' => $type_locations, 'id' => $data[0], 'bootstrapPath' => _BOOTSTRAP_FILE_));
                     } catch (Exception $e) {
                         throw new Exception('Une erreur est survenue durant l\'affichage des données: ' . $e->getMessage());
                     }
                 } else {
                     throw new Exception('Le template "' . $this->view_name . '" n\'existe pas dans "' . _LOCATIONS_VIEWS_ . '"!');
                 }
             } else {
                 throw new Exception('Le modèle "' . $this->model_name . '" n\'existe pas dans "' . _LOCATIONS_MODELS_ . '" ou "' . _SECTORS_MODELS_ . '"!');
             }
         } else {
             throw new Exception('Une erreur est survenue durant la phase de routage!');
         }
     } else {
         throw new Exception('L\'URL n\'est pas évaluable!');
     }
 }
 /**
  * Initialize the CreateController class and their parents
  */
 public function init()
 {
     try {
         parent::init();
     } catch (Exception $e) {
         throw new Exception('Une erreur est survenue durant le chargement du module: ' . $e->getMessage());
     }
     if (file_exists(_CONTROLLERS_DIR_ . '/Tools.php')) {
         $url = Tools::getInstance()->request_url;
         $url .= '&id=ukn';
         $controller = Tools::getInstance()->getUrl_controller($url);
         if ($controller == 'CreateController') {
             if (file_exists(_CUSTOMERS_MODELS_ . '/' . $this->model_name . 'Model.php') && file_exists(_LOCATIONS_MODELS_ . '/' . $this->model_name . 'Model.php')) {
                 if (file_exists(_RENTALS_VIEWS_ . '/' . $this->view_name . '.tpl')) {
                     try {
                         require_once _CUSTOMERS_MODELS_ . '/' . $this->model_name . 'Model.php';
                         require_once _LOCATIONS_MODELS_ . '/' . $this->model_name . 'Model.php';
                         $customers = \Customer\DisplayModel::getInstance()->display_customers();
                         $locations = \Location\DisplayModel::getInstance()->display_locations();
                         echo $this->twig->render($this->view_name . '.tpl', array('customers' => $customers, 'locations' => $locations, 'bootstrapPath' => _BOOTSTRAP_FILE_));
                     } catch (Exception $e) {
                         throw new Exception('Une erreur est survenue durant l\'affichage des données: ' . $e->getMessage());
                     }
                 } else {
                     throw new Exception('Le template "' . $this->view_name . '" n\'existe pas dans "' . _RENTALS_VIEWS_ . '"!');
                 }
             } else {
                 throw new Exception('Le modèle "' . $this->model_name . '" n\'existe pas dans "' . _CUSTOMERS_MODELS_ . '"!');
             }
         } else {
             throw new Exception('Une erreur est survenue durant la phase de routage!');
         }
     } else {
         throw new Exception('L\'URL n\'est pas évaluable!');
     }
 }
 /**
  * Initialize the DisplayController class and their parents
  */
 public function init()
 {
     try {
         parent::init();
     } catch (Exception $e) {
         throw new Exception('Une erreur est survenue durant le chargement du module: ' . $e->getMessage());
     }
     if (file_exists(_CONTROLLERS_DIR_ . '/Tools.php')) {
         $url = Tools::getInstance()->request_url;
         $controller = Tools::getInstance()->getUrl_controller($url);
         if ($controller == 'DisplayController') {
             if (file_exists(_RENTALS_MODELS_ . '/' . $this->model_name . 'Model.php') && file_exists(_RENTALS_MODELS_ . '/' . $this->model_name . 'Model.php') && file_exists(_LOCATIONS_MODELS_ . '/' . $this->model_name . 'Model.php') && file_exists(_SEASONS_MODELS_ . '/' . $this->model_name . 'Model.php') && file_exists(_CARAVANS_MODELS_ . '/' . $this->model_name . 'Model.php')) {
                 if (file_exists(_RENTALS_VIEWS_ . '/' . $this->view_nameAll . '.tpl') && file_exists(_RENTALS_VIEWS_ . '/' . $this->view_nameId . '.tpl')) {
                     try {
                         require_once _RENTALS_MODELS_ . '/' . $this->model_name . 'Model.php';
                         require_once _LOCATIONS_MODELS_ . '/' . $this->model_name . 'Model.php';
                         require_once _SEASONS_MODELS_ . '/' . $this->model_name . 'Model.php';
                         require_once _CARAVANS_MODELS_ . '/' . $this->model_name . 'Model.php';
                         $id = Tools::getInstance()->getUrl_id($url);
                         switch ($id) {
                             case 'all':
                                 $data = \Rental\DisplayModel::getInstance()->display_rentals();
                                 echo $this->twig->render($this->view_nameAll . '.tpl', array('rentals' => $data, 'bootstrapPath' => _BOOTSTRAP_FILE_));
                                 break;
                             default:
                                 if (\Rental\DisplayModel::getInstance()->has_rental($id) == 1) {
                                     $rentals = \Rental\DisplayModel::getInstance()->display_rental($id);
                                     $seasons = array();
                                     $caravans = array();
                                     $locations = array();
                                     $buffer = null;
                                     for ($i = 0; $i < count($rentals); $i++) {
                                         $buffer = \Season\DisplayModel::getInstance()->get_SeasonByRental($rentals[$i]['rent_id']);
                                         if (count($buffer) > 0) {
                                             $seasons = array_merge($seasons, $buffer);
                                         }
                                         $buffer = null;
                                         $buffer = \Caravan\DisplayModel::getInstance()->get_caravanByRental($rentals[$i]['rent_id']);
                                         if (count($buffer) > 0) {
                                             $caravans = array_merge($caravans, $buffer);
                                         }
                                         $buffer = null;
                                         $buffer = \Location\DisplayModel::getInstance()->get_LocationByRental($rentals[$i]['rent_id']);
                                         if (count($buffer) > 0) {
                                             $locations = array_merge($locations, $buffer);
                                         }
                                         $buffer = null;
                                     }
                                     echo $this->twig->render($this->view_nameId . '.tpl', array('rental' => $rentals, 'seasons' => $seasons, 'caravans' => $caravans, 'locations' => $locations, 'bootstrapPath' => _BOOTSTRAP_FILE_));
                                 } else {
                                     header('Location: /Cas-M-Ping/errors/404');
                                 }
                                 break;
                         }
                     } catch (Exception $e) {
                         throw new Exception('Une erreur est survenue durant la récupération des données: ' . $e->getMessage());
                     }
                 } else {
                     throw new Exception('Le template "' . $this->view_nameAll . '" ou "' . $this->view_nameId . '" n\'existe pas dans "' . _RENTALS_VIEWS_ . '"!');
                 }
             } else {
                 throw new Exception('Le modèle "' . $this->model_name . '" n\'existe pas dans "' . _RENTALS_MODELS_ . '"!');
             }
         } else {
             throw new Exception('Une erreur est survenue durant la phase de routage!');
         }
     } else {
         throw new Exception('L\'URL n\'est pas évaluable!');
     }
 }