updated danube so it matches new system initialization standards

This commit is contained in:
Ulf Gebhardt 2013-08-01 14:42:03 +02:00
parent 47d65684be
commit 399a77ffbf
2 changed files with 16 additions and 10 deletions

13
api.php
View File

@ -2,12 +2,15 @@
require_once '../system/autoload.inc.php'; //SYSTEM Classes
require_once 'danube/autoload.inc.php'; //Project Classes
require_once '../system/log/register_exception_shortcut.php'; //allow ERROR() instead of \SYSTEM\LOG\ERROR()
require_once '../system/log/register_errorhandler_dbwriter.php'; //write errors to db
require_once '../system/log/register_errorhandler_jsonoutput.php'; //print errors as json to caller
require_once 'config.php';
SYSTEM\system::start($danube_config);
SYSTEM\system::start($danube_config); //Start System time + config
SYSTEM\system::include_ExceptionShortcut(); //allow ERROR() instead of \SYSTEM\LOG\ERROR()
SYSTEM\system::include_ResultShortcut(); //allow JsonResult() instead of \SYSTEM\LOG\JsonResult()
SYSTEM\system::register_errorhandler_dbwriter(); //write errors to database (must be first errorhandler to register)
SYSTEM\system::register_errorhandler_jsonoutput(); //print errors as json to caller
$api = new \SYSTEM\API\Api (new SYSTEM\verifyclass(), new ApiClass());
echo $api->CALL(array_merge($_POST,$_GET));
echo $api->CALL(array_merge($_POST,$_GET));
//echo \SYSTEM\API\Api::run('\SYSTEM\verify', 'api_danube',array_merge($_POST,$_GET),group,strict=false);

View File

@ -2,12 +2,15 @@
require_once '../system/autoload.inc.php'; //SYSTEM Classes
require_once 'danube/autoload.inc.php'; //Project Classes
require_once '../system/log/register_exception_shortcut.php'; //allow ERROR() instead of \SYSTEM\LOG\ERROR()
require_once '../system/log/register_errorhandler_dbwriter.php'; //write errors to db
require_once '../system/log/register_errorhandler_jsonoutput.php'; //print errors as json to caller
require_once 'config.php';
SYSTEM\system::start($danube_config);
SYSTEM\system::start($danube_config); //Start System time + config
SYSTEM\system::include_ExceptionShortcut(); //allow ERROR() instead of \SYSTEM\LOG\ERROR()
SYSTEM\system::include_ResultShortcut(); //allow JsonResult() instead of \SYSTEM\LOG\JsonResult()
SYSTEM\system::register_errorhandler_dbwriter(); //write errors to database (must be first errorhandler to register)
SYSTEM\system::register_errorhandler_jsonoutput(); //print errors as json to caller
$page = new \SYSTEM\PAGE\PageApi(new SYSTEM\verifyclass(), new PageApi());
echo $page->CALL(array_merge($_POST,$_GET))->html();
echo $page->CALL(array_merge($_POST,$_GET))->html();
new INFO('Page was called sucessfully.');