Пример #1
0
 public function Infra_InfraLoader(Zend_Config $config = null)
 {
     $infaFolder = null;
     $pluginsFolder = null;
     $cachePath = null;
     if ($config) {
         if (isset($config->cachePath)) {
             $cachePath = $config->cachePath;
         }
         if (isset($config->infaFolder)) {
             $infaFolder = $config->infaFolder;
         }
         if (isset($config->pluginsFolder)) {
             $pluginsFolder = $config->pluginsFolder;
         }
     }
     if (!$infaFolder) {
         $infaFolder = realpath(dirname(__FILE__) . '/../../infra/');
     }
     if (!$pluginsFolder) {
         $pluginsFolder = realpath(dirname(__FILE__) . '/../../plugins/');
     }
     if (!$cachePath) {
         $cachePath = kEnvironment::get("cache_root_path") . '/infra/classMap.cache';
     }
     require_once $infaFolder . DIRECTORY_SEPARATOR . 'KAutoloader.php';
     require_once $infaFolder . DIRECTORY_SEPARATOR . 'kEnvironment.php';
     KAutoloader::setClassPath(array($infaFolder . DIRECTORY_SEPARATOR . '*'));
     KAutoloader::addClassPath(KAutoloader::buildPath($pluginsFolder, '*'));
     KAutoloader::setClassMapFilePath($cachePath);
     KAutoloader::register();
 }
 public function Infra_InfraLoader()
 {
     $infaDir = realpath(dirname(__FILE__) . '/../../infra/');
     $pluginsDir = realpath(dirname(__FILE__) . '/../../plugins/');
     require_once $infaDir . DIRECTORY_SEPARATOR . 'bootstrap_base.php';
     require_once $infaDir . DIRECTORY_SEPARATOR . 'KAutoloader.php';
     KAutoloader::setClassPath(array($infaDir . DIRECTORY_SEPARATOR . '*'));
     KAutoloader::addClassPath(KAutoloader::buildPath($pluginsDir, '*'));
     KAutoloader::setClassMapFilePath(kConf::get("cache_root_path") . '/admin/classMap.cache');
     KAutoloader::register();
 }
Пример #3
0
<?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) {
}
Пример #4
0
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;
}
 /**
  * 
  * Used to initialize the ui conf deployment like a bootstarp fiel
  * @param unknown_type $conf_file_path
  */
 public static function init($conf_file_path)
 {
     require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . ".." . DIRECTORY_SEPARATOR . ".." . DIRECTORY_SEPARATOR . "infra" . DIRECTORY_SEPARATOR . "bootstrap_base.php";
     require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . ".." . DIRECTORY_SEPARATOR . ".." . DIRECTORY_SEPARATOR . "infra" . DIRECTORY_SEPARATOR . "kConf.php";
     define("KALTURA_API_PATH", KALTURA_ROOT_PATH . DIRECTORY_SEPARATOR . "api_v3");
     // Autoloader
     require_once KALTURA_INFRA_PATH . DIRECTORY_SEPARATOR . "KAutoloader.php";
     KAutoloader::addClassPath(KAutoloader::buildPath(KALTURA_ROOT_PATH, "vendor", "propel", "*"));
     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::addClassPath(KAutoloader::buildPath(KALTURA_ROOT_PATH, "generator"));
     // needed for testmeDoc
     KAutoloader::setClassMapFilePath(kConf::get("cache_root_path") . '/deploy/' . basename(__FILE__) . '.cache');
     //KAutoloader::dumpExtra();
     KAutoloader::register();
     $dbConf = kConf::getDB();
     DbManager::setConfig($dbConf);
     DbManager::initialize();
     date_default_timezone_set(kConf::get("date_default_timezone"));
     //		try
     //		{
     $confObj = new Zend_Config_Ini($conf_file_path);
     //		}
     //		catch(Exception $ex)
     //		{
     //			echo 'Exiting on ERROR: '.$ex->getMessage().PHP_EOL;
     //			exit(1);
     //		}
     return $confObj;
 }
Пример #6
0
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;
}
Пример #7
0
 public static function init($conf_file_path)
 {
     require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . ".." . DIRECTORY_SEPARATOR . ".." . DIRECTORY_SEPARATOR . "infra" . DIRECTORY_SEPARATOR . "bootstrap_base.php";
     require_once SF_ROOT_DIR . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'kConf.php';
     define("KALTURA_API_PATH", KALTURA_ROOT_PATH . DIRECTORY_SEPARATOR . "api_v3");
     // Autoloader
     require_once KALTURA_INFRA_PATH . DIRECTORY_SEPARATOR . "KAutoloader.php";
     KAutoloader::addClassPath(KAutoloader::buildPath(KALTURA_ROOT_PATH, "vendor", "propel", "*"));
     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::addClassPath(KAutoloader::buildPath(KALTURA_ROOT_PATH, "generator"));
     // needed for testmeDoc
     KAutoloader::setClassMapFilePath(kConf::get("cache_root_path") . '/deploy/classMap.cache');
     //KAutoloader::dumpExtra();
     KAutoloader::register();
     $dbConf = kConf::getDB();
     DbManager::setConfig($dbConf);
     DbManager::initialize();
     $conf = parse_ini_file($conf_file_path, true);
     $confObj = new Zend_Config_Ini($conf_file_path);
     return $confObj;
 }