|
|
@ -34,19 +34,15 @@ try{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
unset($parameters['method']);
|
|
|
|
unset($parameters['method']);
|
|
|
|
$listGateway = array("\\Gateway\\GatewayForm", "\\Gateway\\GatewayKeyword", "\\Gateway\\GatewayQuestion");
|
|
|
|
$listGateway = array("\\Gateway\\GatewayForm", "\\Gateway\\GatewayKeyword", "\\Gateway\\GatewayQuestion");
|
|
|
|
foreach ($listGateway as $gateway) // Pour chaque Gateway
|
|
|
|
foreach ($listGateway as $gateway){
|
|
|
|
{
|
|
|
|
|
|
|
|
if (method_exists($gateway, $method)) {
|
|
|
|
if (method_exists($gateway, $method)) {
|
|
|
|
$response->getBody()->write(print_r((new $gateway)->$method($parameters))); // Si oui, on appelle cette fonction
|
|
|
|
$response->getBody()->write(print_r((new $gateway)->$method($parameters)));
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$temp = array('response' => "Rien", 'test' => "Test Ici");
|
|
|
|
$temp = array('response' => "Rien", 'test' => "Test Ici");
|
|
|
|
foreach ($temp as $key => $value) {
|
|
|
|
$response->getBody()->write(print_r($temp));
|
|
|
|
$response->getBody()->write($key,$value);
|
|
|
|
//return $response;
|
|
|
|
}
|
|
|
|
return $response->withHeader('Content-type', 'application/json');
|
|
|
|
return $response;
|
|
|
|
|
|
|
|
//return $response->withHeader('Content-type', 'application/json');
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}catch (TypeError $t){
|
|
|
|
}catch (TypeError $t){
|
|
|
|
echo "Error, wrong parameters key, or no parameters write : ".$t->getMessage();
|
|
|
|
echo "Error, wrong parameters key, or no parameters write : ".$t->getMessage();
|
|
|
|