function init($conf_file_path) { $conf = parse_ini_file($conf_file_path, true); require_once $conf['statics']['infra_path'] . DIRECTORY_SEPARATOR . "bootstrap_base.php"; require_once KALTURA_INFRA_PATH . DIRECTORY_SEPARATOR . "KAutoloader.php"; KAutoloader::setIncludePath(array(KAutoloader::buildPath(KALTURA_ROOT_PATH, "vendor", "ZendFramework", "library"))); KAutoloader::register(); $confObj = new Zend_Config_Ini('config.ini'); return $confObj; }
<?php /** * * @package Scheduler */ chdir(__DIR__); define('KALTURA_ROOT_PATH', realpath(__DIR__ . '/../')); require_once KALTURA_ROOT_PATH . '/alpha/config/kConf.php'; define("KALTURA_BATCH_PATH", KALTURA_ROOT_PATH . "/batch"); // Autoloader - override the autoloader defaults require_once KALTURA_ROOT_PATH . "/infra/KAutoloader.php"; KAutoloader::setClassPath(array(KAutoloader::buildPath(KALTURA_ROOT_PATH, "infra", "*"), KAutoloader::buildPath(KALTURA_ROOT_PATH, "vendor", "*"), KAutoloader::buildPath(KALTURA_ROOT_PATH, "plugins", "*"), KAutoloader::buildPath(KALTURA_BATCH_PATH, "*"))); KAutoloader::addClassPath(KAutoloader::buildPath(KALTURA_ROOT_PATH, "plugins", "*", "batch", "*")); KAutoloader::setIncludePath(array(KAutoloader::buildPath(KALTURA_ROOT_PATH, "vendor", "ZendFramework", "library"))); KAutoloader::setClassMapFilePath(kEnvironment::get("cache_root_path") . '/batch/classMap.cache'); KAutoloader::register(); // Logger $loggerConfigPath = KALTURA_ROOT_PATH . "/configurations/logger.ini"; try { $config = new Zend_Config_Ini($loggerConfigPath); KalturaLog::initLog($config->batch_scheduler); KalturaLog::setContext("BATCH"); } catch (Zend_Config_Exception $ex) { }
function init($conf_file_path, $infra_path) { $conf = parse_ini_file($conf_file_path, true); require_once KALTURA_ROOT_PATH . DIRECTORY_SEPARATOR . "infra" . DIRECTORY_SEPARATOR . "KAutoloader.php"; KAutoloader::setIncludePath(array(KAutoloader::buildPath(KALTURA_ROOT_PATH, "vendor", "ZendFramework", "library"))); KAutoloader::register(); $confObj = new Zend_Config_Ini($conf_file_path); return $confObj; }