public function GetPrivateCollections()
 {
     if (CommonController::IsAuthentified()) {
         $wSCtrl = new WebServicesController();
         $response = $wSCtrl->Call("Collection", "GET", ["id" => $_SESSION['id']]);
         var_dump($response);
     }
     return null;
 }
 public function Index()
 {
     $login = isset($_POST['login']) ? $_POST['login'] : null;
     $password = isset($_POST['password']) ? $_POST['password'] : null;
     if (is_null($password) || empty($password)) {
         if (is_null($login) || empty($login)) {
             CommonController::SetView("login", "index");
         } else {
             CommonController::SetView("login", "index", ['login' => $login]);
         }
     } else {
         $WSCtrl = new WebServicesController();
         $data = ['login' => $login, 'password' => $password];
         $response = $WSCtrl->Call("Login", "POST", $data);
         if ($response === 'false') {
             CommonController::SetView("login", "index", ['login' => $login, 'error' => 'Impossible de vous connecter, vérifiez vos identifiants.']);
         } else {
             $array = json_decode($response, true);
             $_SESSION['jwt'] = $array['jwt'];
             $_SESSION['id'] = $array['id'];
             CommonController::Redirect("Home");
         }
     }
 }