TEMP : try to use print_r
continuous-integration/drone/push Build is passing Details

master
dorian.hodin 2 years ago
parent b97b659e3a
commit a3b48f1f3a

@ -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();

Loading…
Cancel
Save