Version 0.9.5 beta - added additional json/application headers for a possible REST module
This commit is contained in:
@@ -83,6 +83,15 @@ class View implements IView
|
|||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @desc setting response to application json headers
|
||||||
|
*/
|
||||||
|
public static function forwardToJsonHeader()
|
||||||
|
{
|
||||||
|
header(self::NIBIRU_CONTENT_TYPE_JSON, true);
|
||||||
|
header(self::NIBIRU_CONTENT_TYPE_CONNECTION, true);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $page
|
* @param $page
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -10,11 +10,14 @@ namespace Nibiru;
|
|||||||
*/
|
*/
|
||||||
interface IView
|
interface IView
|
||||||
{
|
{
|
||||||
const NIBIRU_SETTINGS = "SETTINGS";
|
const NIBIRU_SETTINGS = "SETTINGS";
|
||||||
const NIBIRU_URL = "pageurl";
|
const NIBIRU_URL = "pageurl";
|
||||||
const NIBIRU_ERROR = "ERROR";
|
const NIBIRU_ERROR = "ERROR";
|
||||||
const NIBIRU_SECURITY = "SECURITY";
|
const NIBIRU_SECURITY = "SECURITY";
|
||||||
const NIBIRU_ROUTING = "ROUTING";
|
const NIBIRU_ROUTING = "ROUTING";
|
||||||
const NIBIRU_EMAIL = "EMAIL";
|
const NIBIRU_EMAIL = "EMAIL";
|
||||||
const NIBIRU_FILE_END = ".tpl";
|
const NIBIRU_FILE_END = ".tpl";
|
||||||
|
const NIBIRU_CONTENT_TYPE_JSON = "Content-Type: application/json";
|
||||||
|
const NIBIRU_CONTENT_TYPE_CONNECTION = "Connection: keep-alive";
|
||||||
|
const NIBIRU_CONTENT_RESPONSE_OK = "HTTP/1.1 200 OK";
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user