本文整理汇总了PHP中KAutoloader::setClassPath方法的典型用法代码示例。如果您正苦于以下问题:PHP KAutoloader::setClassPath方法的具体用法?PHP KAutoloader::setClassPath怎么用?PHP KAutoloader::setClassPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KAutoloader
的用法示例。
在下文中一共展示了KAutoloader::setClassPath方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Infra_InfraLoader
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();
}
示例2: Infra_InfraLoader
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: chdir
<?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: dirname
<?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();
示例5: dirname
<?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();
示例6: dirname
<?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();
示例7: define
* 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) {
}