new index,api,sai conventions for system @ danube

This commit is contained in:
Ulf Gebhardt 2013-12-21 04:13:18 +01:00
parent 060b9b81fe
commit b4927d6f3a
4 changed files with 19 additions and 20 deletions

14
api.php
View File

@ -1,13 +1,13 @@
<?php
require_once '../system/autoload.inc.php'; //SYSTEM Classes
\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
require_once 'danube/autoload.inc.php'; //Project Classes
require_once 'config.php';
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
\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()
echo \SYSTEM\API\api::run('\SYSTEM\API\verify', 'api_danube',array_merge($_POST,$_GET));
echo \SYSTEM\API\api::run('\SYSTEM\API\verify', 'api_danube',\array_merge($_POST,$_GET));

View File

@ -2,7 +2,7 @@
$danube_config = array( array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_ERRORREPORTING, E_ALL | E_STRICT),
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL, 'http://www.mojotrollz.eu/web/danube/'),
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEPATH, '/home/web/webdir/danube/'),
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DEFAULT_RESULT, 'json'),
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DEFAULT_RESULT, \SYSTEM\CONFIG\config_ids::SYS_CONFIG_DEFAULT_RESULT_JSON),
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_TYPE, SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_TYPE_MYS),
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_HOST, '127.0.0.1'),
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_PORT, ''),

View File

@ -1,14 +1,13 @@
<?php
require_once '../system/autoload.inc.php'; //SYSTEM Classes
require_once 'danube/autoload.inc.php'; //Project Classes
require_once '../system/autoload.inc.php'; //SYSTEM Classes
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
require_once 'danube/autoload.inc.php'; //Project Classes
require_once 'config.php';
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\API\verify(), new PageApi());
//echo $page->CALL(array_merge($_POST,$_GET))->html();

14
sai.php
View File

@ -1,13 +1,13 @@
<?php
require_once '../system/autoload.inc.php'; //SYSTEM Classes
require_once 'danube/autoload.inc.php'; //Project Classes
require_once 'config.php'; //Server 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()
require_once '../system/autoload.inc.php'; //SYSTEM Classes
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
require_once 'danube/autoload.inc.php'; //Project Classes
require_once 'config.php'; //Server 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()
require_once '../system/sai/autoload.inc.php';
require_once 'danube/sai/autoload.inc.php';