-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbootstrapper.inc.php
executable file
·51 lines (37 loc) · 1.3 KB
/
bootstrapper.inc.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
//if (isset($_GET['dev'])) {
ini_set("display_errors","1");
error_reporting(E_ALL);
//} else {
// ini_set("display_errors","0");
// error_reporting(E_PARSE);
//}
/** Absolute path to the directory. */
if ( ! defined( 'ABSPATH' ) ) {
define( 'ABSPATH', dirname( __FILE__ ) . '/' );
}
$classes_to_load = array('datastorer','registry','serviceuse','db','route','utils', 'koboldapi');
foreach($classes_to_load as $class_load){
require_once(ABSPATH . 'classes/' . $class_load . '.class.php');
}
$local_setting_file = ABSPATH . 'inc/localsettings.inc.php';//localsettings.inc.php'; localsettings.inc.php
if( file_exists($local_setting_file)):
require($local_setting_file); //common settings
else:
require(ABSPATH . 'inc/settings.inc.php'); //common settings
endif;
$registry = new Registry();
$registry->db = new Db( $DB_USER, $DB_PASS, $DB_DATABASE, $DB_SERVER );
$registry->debuglevel = $debuglevel;
$registry->llm = new KoboldApi($LLM_SERVER);
//$registry->data_store_dir = $data_store_dir;
/*
$registry->route = new Route( $URLPATH, $FOLDER_PREFIX );
//$route = new Route( $URLPATH, $FOLDER_PREFIX );
if( in_array($registry->route->operation, $allowed_operations ) ){
$operator = new $registry->route->operation;
$operator->SetRegistry($registry);
}else{
Utils::DoingItWrong("No operator for that");
}
*/