Example #1
0
}
// In case $src_adm_relative_path is not set (in case of an update), use the default.
$src_adm_relative_path = isset($src_adm_relative_path) ? $src_adm_relative_path : 'adm/';
$src_admin_path = defined('src_ADMIN_PATH') ? src_ADMIN_PATH : $src_root_path . $src_adm_relative_path;
// Include files
require $src_root_path . 'includes/functions.' . $phpEx;
require $src_root_path . 'includes/functions_content.' . $phpEx;
require $src_root_path . 'includes/constants.' . $phpEx;
include $src_root_path . 'includes/utf/utf_normalizer.' . $phpEx;
require $src_root_path . 'includes/utf/utf_tools.' . $phpEx;
// Set PHP error handler to ours
set_error_handler(defined('src_MSG_HANDLER') ? src_MSG_HANDLER : 'msg_handler');
// Set up container (must be done here because extensions table may not exist)
$src_container_builder = new \src\di\container_builder($src_config_php_file, $src_root_path, $phpEx);
$src_container_builder->set_use_extensions(false);
$src_container_builder->set_use_kernel_pass(false);
$src_container_builder->set_dump_container(false);
$src_container = $src_container_builder->get_container();
// set up caching
$cache = $src_container->get('cache');
// Instantiate some basic classes
$src_dispatcher = $src_container->get('dispatcher');
$request = $src_container->get('request');
$user = $src_container->get('user');
$auth = $src_container->get('auth');
$db = $src_container->get('dbal.conn');
$src_log = $src_container->get('log');
// make sure request_var uses this request instance
request_var('', 0, false, false, $request);
// "dependency injection" for a function
// Grab global variables, re-cache if necessary