forked from kaltura/server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.php
31 lines (24 loc) · 1.61 KB
/
bootstrap.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
<?php
if (!defined("KALTURA_ROOT_PATH")) // may already be defined when invoked through kwidgetAction
define("KALTURA_ROOT_PATH", realpath(__DIR__ . '/../'));
if (!defined("SF_ROOT_DIR")) // may already be defined when invoked through kwidgetAction
define('SF_ROOT_DIR', KALTURA_ROOT_PATH . '/alpha');
define("KALTURA_API_V3", true); // used for different logic in alpha libs
define("KALTURA_API_PATH", KALTURA_ROOT_PATH.DIRECTORY_SEPARATOR."api_v3");
require_once(KALTURA_API_PATH.DIRECTORY_SEPARATOR.'VERSION.php'); //defines KALTURA_API_VERSION
require_once (KALTURA_ROOT_PATH.DIRECTORY_SEPARATOR.'alpha'.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'kConf.php');
// Autoloader
require_once(KALTURA_ROOT_PATH.DIRECTORY_SEPARATOR."infra".DIRECTORY_SEPARATOR."KAutoloader.php");
KAutoloader::setClassMapFilePath(kConf::get("cache_root_path") . '/api_v3/classMap.cache');
KAutoloader::addClassPath(KAutoloader::buildPath(KALTURA_ROOT_PATH, "vendor", "propel", "*"));
KAutoloader::addClassPath(KAutoloader::buildPath(KALTURA_ROOT_PATH, "vendor", "nusoap", "*"));
KAutoloader::addClassPath(KAutoloader::buildPath(KALTURA_API_PATH, "lib", "*"));
KAutoloader::addClassPath(KAutoloader::buildPath(KALTURA_API_PATH, "services", "*"));
KAutoloader::addClassPath(KAutoloader::buildPath(KALTURA_ROOT_PATH, "alpha", "plugins", "*")); // needed for testmeDoc
KAutoloader::addClassPath(KAutoloader::buildPath(KALTURA_ROOT_PATH, "plugins", "*"));
KAutoloader::register();
// Timezone
date_default_timezone_set(kConf::get("date_default_timezone")); // America/New_York
// Logger
kLoggerCache::InitLogger('api_v3');
KalturaLog::setContext("API");