wip: added rest api endpoint shiai
This commit is contained in:
31
homepage/participo/api/inc/bootstrap.php
Normal file
31
homepage/participo/api/inc/bootstrap.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/// @file common settings and includes for the participo api
|
||||
/// - set locale to german
|
||||
setlocale(LC_ALL, "de_DE@euro", "de_DE", "de", "ge");
|
||||
/// - extend the include search path for
|
||||
set_include_path(implode(
|
||||
PATH_SEPARATOR,
|
||||
[
|
||||
get_include_path(),
|
||||
/// - user defined libs (e.g. participo)
|
||||
"../lib",
|
||||
/// - config files (we reuse the participo-wide configuration)
|
||||
".."
|
||||
]
|
||||
));
|
||||
|
||||
/// - participo configuration
|
||||
require_once("config/participo.php");
|
||||
/// - data base credentials
|
||||
require_once("local/cwsvJudo.php");
|
||||
|
||||
/// - since this is a rest api implementation we can assume each endpoint needs dbAccess
|
||||
require_once("participoLib/dbConnector.php");
|
||||
|
||||
/// - initialize the database connection
|
||||
dbConnector::connect(
|
||||
$cwsvJudoConfig["db"]["host"],
|
||||
$cwsvJudoConfig["db"]["name"],
|
||||
$cwsvJudoConfig["db"]["user"],
|
||||
$cwsvJudoConfig["db"]["password"]
|
||||
);
|
||||
Reference in New Issue
Block a user