script = new ScriptDatabase(); // $this->script->executeScript(); try { if (empty($_REQUEST['action'])) { $action = NULL; } else { $action = $_REQUEST['action']; } $listGateway = array(""); //TODO : nom des différentes Gateway à mettre foreach ($listGateway as $gateway) // Pour chaque Gateway { /* On regarde s'il implémente une fonction du même nom que l'action reçue */ if(method_exists($gateway, $action)) { (new $gateway)->$action(); // Si oui, on appelle cette fonction } } } catch (PDOException) { return http_response_code(404); } exit(0); } }