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(); }
<?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) { }
<?php require_once dirname(__FILE__) . "/../../infra/bootstrap_base.php"; require_once KALTURA_ROOT_PATH . '/alpha/config/kConf.php'; define("KALTURA_TEST_PATH", KALTURA_ROOT_PATH . "/tests/base"); // Autoloader - override the autoloader defaults require_once KALTURA_INFRA_PATH . DIRECTORY_SEPARATOR . "KAutoloader.php"; KAutoloader::setClassPath(array(KAutoloader::buildPath(KALTURA_ROOT_PATH, "vendor", "propel", "*"), KAutoloader::buildPath(KALTURA_ROOT_PATH, "infra", "*"), KAutoloader::buildPath(KALTURA_ROOT_PATH, "alpha", "lib", "*"), KAutoloader::buildPath(KALTURA_ROOT_PATH, "alpha", "apps", "kaltura", "lib", "*"), KAutoloader::buildPath(KALTURA_ROOT_PATH, "plugins", "*"), KAutoloader::buildPath(KALTURA_ROOT_PATH, "tests", "base", "*"), KAutoloader::buildPath(KALTURA_ROOT_PATH, "tests", "api", "*"), KAutoloader::buildPath(KALTURA_ROOT_PATH, "tests", "lib", "*"))); KAutoloader::setIncludePath(array(KAutoloader::buildPath(KALTURA_ROOT_PATH, "vendor", "ZendFramework", "library"))); KAutoloader::setClassMapFilePath(kConf::get("cache_root_path") . '/unitTest_api/classMap.cache'); KAutoloader::register(); // Timezone date_default_timezone_set(kConf::get("date_default_timezone")); // America/New_York // Logger $loggerConfigPath = KALTURA_TEST_PATH . "/config/logger.ini"; try { $config = new Zend_Config_Ini($loggerConfigPath); } catch (Zend_Config_Exception $ex) { $config = null; } KalturaLog::initLog($config); KalturaLog::setContext("TESTS"); // set DB DbManager::setConfig(kConf::getDB()); DbManager::initialize();
<?php require_once dirname(__FILE__) . "/../../infra/bootstrap_base.php"; require_once KALTURA_ROOT_PATH . '/infra/kConf.php'; // Autoloader - override the autoloader defaults require_once KALTURA_INFRA_PATH . DIRECTORY_SEPARATOR . "KAutoloader.php"; KAutoloader::setClassPath(array(KAutoloader::buildPath(KALTURA_ROOT_PATH, "vendor", "propel", "*"), KAutoloader::buildPath(KALTURA_ROOT_PATH, "infra", "*"), KAutoloader::buildPath(KALTURA_ROOT_PATH, "alpha", "lib", "*"), KAutoloader::buildPath(KALTURA_ROOT_PATH, "alpha", "apps", "kaltura", "lib", "*"), KAutoloader::buildPath(KALTURA_ROOT_PATH, "plugins", "*"), KAutoloader::buildPath(KALTURA_ROOT_PATH, "tests", "base", "*"), KAutoloader::buildPath(KALTURA_ROOT_PATH, "tests", "unitTests", "*"), KAutoloader::buildPath(KALTURA_ROOT_PATH, "tests", "common", "*"), KAutoloader::buildPath(KALTURA_ROOT_PATH, "tests", "roles_and_permissions", "*"), KAutoloader::buildPath(KALTURA_ROOT_PATH, "api_v3", "lib", "*"), KAutoloader::buildPath(KALTURA_ROOT_PATH, "api_v3", "services", "*"))); //Add the zend phpunit support KAutoloader::setIncludePath(array(KAutoloader::buildPath(KALTURA_ROOT_PATH, "vendor", "ZendFramework", "library"))); //File path to entire server cache folder KAutoloader::setClassMapFilePath(kConf::get("cache_root_path") . 'unitTest_serverSide/classMap.cache'); KAutoloader::register(); //The kaltura client date_default_timezone_set(kConf::get("date_default_timezone")); // America/New_York //Set the DB DbManager::setConfig(kConf::getDB()); DbManager::initialize();
<?php require_once dirname(__FILE__) . "/../../infra/bootstrap_base.php"; require_once KALTURA_ROOT_PATH . '/alpha/config/kConf.php'; // Autoloader - override the autoloader defaults require_once KALTURA_INFRA_PATH . DIRECTORY_SEPARATOR . "KAutoloader.php"; KAutoloader::setClassPath(array(KAutoloader::buildPath(KALTURA_ROOT_PATH, "vendor", "propel", "*"), KAutoloader::buildPath(KALTURA_ROOT_PATH, "infra", "*"), KAutoloader::buildPath(KALTURA_ROOT_PATH, "alpha", "lib", "*"), KAutoloader::buildPath(KALTURA_ROOT_PATH, "plugins", "*"), KAutoloader::buildPath(KALTURA_ROOT_PATH, "tests", "base", "*"), KAutoloader::buildPath(KALTURA_ROOT_PATH, "tests", "lib", "*"), KAutoloader::buildPath(KALTURA_ROOT_PATH, "tests", "UnitTests", "*"), KAutoloader::buildPath(KALTURA_ROOT_PATH, "tests", "roles_and_permissions", "*"))); //Add the zend phpunit support KAutoloader::setIncludePath(array(KAutoloader::buildPath(KALTURA_ROOT_PATH, "vendor", "ZendFramework", "library"))); //File path to entire server cache folder KAutoloader::setClassMapFilePath(kConf::get("cache_root_path") . 'unitTest_clientSide/classMap.cache'); KAutoloader::register(); //The kaltura client date_default_timezone_set(kConf::get("date_default_timezone")); // America/New_York //Set the DB DbManager::setConfig(kConf::getDB()); DbManager::initialize();
* limitations under the License. * * Modified by Akvelon Inc. * 2014-06-30 * http://www.akvelon.com/contact-us */ /** * * @package Scheduler */ require_once "../infra/bootstrap_base.php"; require_once KALTURA_ROOT_PATH . '/infra/kConf.php'; require_once KALTURA_ROOT_PATH . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php'; define("KALTURA_BATCH_PATH", KALTURA_ROOT_PATH . "/batch"); // Autoloader - override the autoloader defaults require_once KALTURA_INFRA_PATH . "/KAutoloader.php"; KAutoloader::setClassPath(array(KAutoloader::buildPath(KALTURA_ROOT_PATH, "infra", "*"), KAutoloader::buildPath(KALTURA_ROOT_PATH, "vendor", "PHPMailer", "*"), KAutoloader::buildPath(KALTURA_ROOT_PATH, "vendor", "phpseclib", "*"), KAutoloader::buildPath(KALTURA_ROOT_PATH, "plugins", "*"), KAutoloader::buildPath(KALTURA_ROOT_PATH, "vendor", "propel", "*"), KAutoloader::buildPath(KALTURA_ROOT_PATH, "alpha", "*"), 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(kConf::get("cache_root_path") . '/batch/classMap.cache'); KAutoloader::register(); set_include_path(get_include_path() . PATH_SEPARATOR . KAutoloader::buildPath(KALTURA_ROOT_PATH, "vendor", "phpseclib")); set_include_path(get_include_path() . PATH_SEPARATOR . KAutoloader::buildPath(KALTURA_ROOT_PATH, "alpha", "apps", "kaltura", "lib")); // Logger $loggerConfigPath = KALTURA_ROOT_PATH . "/configurations/logger.ini"; try { $config = new Zend_Config_Ini($loggerConfigPath); KalturaLog::initLog($config->batch); KalturaLog::setContext("BATCH"); } catch (Zend_Config_Exception $ex) { }