Outputrest : manage the http_response_code() if set
This commit is contained in:
@@ -32,9 +32,10 @@ class Outputrest extends Output
|
|||||||
$layout = FALSE, $replacement = array(),
|
$layout = FALSE, $replacement = array(),
|
||||||
$variable = array (), $module = "")
|
$variable = array (), $module = "")
|
||||||
{
|
{
|
||||||
if (! isset ($variable["exceptionCode"]))
|
$code = http_response_code();
|
||||||
$variable["exceptionCode"] = 200;
|
if (isset ($variable["exceptionCode"]))
|
||||||
|
$code = $variable["exceptionCode"];
|
||||||
$rest = new Rest ();
|
$rest = new Rest ();
|
||||||
$rest->display ($data, $variable["exceptionCode"]);
|
$rest->display ($data, $code);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user