本文整理汇总了PHP中kConf::map方法的典型用法代码示例。如果您正苦于以下问题:PHP kConf::map方法的具体用法?PHP kConf::map怎么用?PHP kConf::map使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kConf
的用法示例。
在下文中一共展示了kConf::map方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init
private static function init()
{
if (self::$map) {
return;
}
$cacheDir = realpath(dirname(__FILE__) . '/../cache');
self::$map = array();
$reloadFileExists = file_exists("{$cacheDir}/base.reload");
if (!$reloadFileExists && function_exists('apc_fetch')) {
self::$map = apc_fetch(self::APC_CACHE_MAP);
if (self::$map) {
return;
}
}
$configDir = realpath(dirname(__FILE__) . '/../configurations');
if (!file_exists("{$configDir}/base.ini")) {
error_log("Base configuration not found [{$configDir}/base.ini]");
die("Base configuration not found [{$configDir}/base.ini]");
}
$config = parse_ini_file("{$configDir}/base.ini", true);
if (!file_exists("{$configDir}/local.ini")) {
error_log("Local configuration not found [{$configDir}/local.ini]");
die("Local configuration not found [{$configDir}/local.ini]");
}
$localConfig = parse_ini_file("{$configDir}/local.ini", true);
$config = self::mergeConfigItem($config, $localConfig);
$hostname = isset($_SERVER["HOSTNAME"]) ? $_SERVER["HOSTNAME"] : gethostname();
if ($hostname) {
$localConfigFile = "{$hostname}.ini";
$configPath = "{$configDir}/hosts";
$configDir = dir($configPath);
while (false !== ($iniFile = $configDir->read())) {
$iniFileMatch = str_replace('#', '*', $iniFile);
if (!fnmatch($iniFileMatch, $localConfigFile)) {
continue;
}
$localConfig = parse_ini_file("{$configPath}/{$iniFile}", true);
$config = self::mergeConfigItem($config, $localConfig);
}
$configDir->close();
}
self::$map = $config;
if (function_exists('apc_store')) {
$res = apc_store(self::APC_CACHE_MAP, self::$map);
if ($reloadFileExists && $res && PHP_SAPI != 'cli') {
$deleted = @unlink("{$cacheDir}/base.reload");
error_log("Base configuration reloaded");
if (!$deleted) {
error_log("Failed to delete base.reload file");
}
}
}
}
示例2: addConfig
protected static function addConfig()
{
self::$map = array_merge(self::$map, array("sf_debug" => false, "sf_logging_enabled" => true, "sf_root_dir" => dirname(__FILE__) . '/../', "delivery_block_countries" => "", "enable_cache" => true, "v3cache_ignore_params" => array(), "v3cache_ignore_admin_ks" => array(), "terms_of_use_uri" => "index.php/terms", "server_api_v2_path" => "/api/", "default_duplication_time_frame" => 60, "job_duplication_time_frame" => array(1 => 7200), "default_job_execution_attempt" => 3, "job_execution_attempt" => array(16 => 5, 4 => 1, 23 => 2, 28 => 10), "default_job_retry_interval" => 60, "job_retry_intervals" => array(16 => 600, 15 => 150, 1 => 300, 23 => 300, 4 => 180, 10 => 1800, 29 => 300), "ignore_cdl_failure" => false, "batch_ignore_duplication" => true, "priority_percent" => array(1 => 33, 2 => 27, 3 => 20, 4 => 13, 5 => 7), "priority_time_range" => 60, "system_allow_edit_kConf" => false, "testmeconsole_state" => true, "flash_root_url" => "", "uiconf_root_url" => "", "content_root_url" => "", "kmc_display_customize_tab" => true, "kmc_display_account_tab" => true, "kmc_content_enable_commercial_transcoding" => true, "kmc_content_enable_live_streaming" => true, "kmc_login_show_signup_link" => false, "kmc_display_developer_tab" => false, "kmc_display_server_tab" => false, "kmc_account_show_usage" => true, "kmc_content_version" => 'v3.2.12.2', "kmc_account_version" => 'v3.1.3', "kmc_appstudio_version" => 'v2.2.3', "kmc_rna_version" => 'v1.1.8.4', "kmc_dashboard_version" => 'v1.0.14.2', "kmc_login_version" => 'v1.1.11.1', "kcw_flex_wrapper_version" => 'v1.2', "editors_flex_wrapper_version" => 'v1.01', "kdp_wrapper_version" => 'v11.0', "kdp3_wrapper_version" => 'v34.0', "html5_version" => '1.3.3', "kmc_secured_login" => false, "kmc_version" => 'v4.0.12.5', "new_partner_kmc_version" => 4, "paypal_data" => array(), "limelight_madiavault_password" => "", "level3_authentication_key" => "", "akamai_auth_smooth_param" => "", "akamai_auth_smooth_salt" => "", "akamai_auth_smooth_seconds" => 300, "marketo_access_key" => "", "marketo_secret_key" => "", 'kdpwrapper_track_url' => "http://kalstats.kaltura.com/index.php/events/player_event", "kaltura_partner_id" => "", "template_partner_id" => 99, "url_managers" => array(), "kaltura_email_hash" => "admin", "default_plugins" => array("MetadataPlugin", "DocumentPlugin", "SphinxSearchPlugin", "StorageProfilePlugin"), "event_consumers" => array("kFlowManager", "kStorageExporter", "kObjectCopyHandler", "kObjectDeleteHandler", "kPermissionManager"), "event_consumers_default_priority" => 5, "event_consumers_priorities" => array('kVirusScanFlowManager' => 7), "cache_root_path" => dirname(__FILE__) . '/../../cache/', "general_cache_dir" => dirname(__FILE__) . '/../../cache/general', 'response_cache_dir' => dirname(__FILE__) . '/../../cache/response/', 'apc_cache_ttl' => 900, "exec_sphinx" => false, 'user_login_set_password_hash_key_validity' => 60 * 60 * 24, 'user_login_max_wrong_attempts' => 5000, 'user_login_block_period' => 0, 'user_login_num_prev_passwords_to_keep' => 0, 'user_login_password_replace_freq' => 60 * 60 * 24 * 5000, 'user_login_password_structure' => array('/^.{8,14}$/', '/[0-9]+/', '/[a-z]+/', '/[~!@#$%^*=+?\\(\\)\\-\\[\\]\\{\\}]+/', '/^[^<>]*$/'), 'disable_url_hashing' => 'true', 'report_partner_registration' => false, "usage_tracking_url" => "http://corp.kaltura.com/index.php/events/usage_tracking", "no_save_of_last_login_partner_for_partner_ids" => array(0, -1, -2, 99), "temp_folder" => '/opt/kaltura/tmp', 'ps2_actions_not_blocked_by_permissions' => array('contactsalesforceaction', 'mymultirequest', 'adminloginaction', 'resetadminpasswordaction', 'executeplaylistaction', 'reporterroraction', 'searchautodataaction', 'addentryaction', 'searchmediainfoaction', 'checknotificationsaction', 'getdataentryaction', 'getentryaction', 'getkshowaction', 'getallentriesaction', 'updatedataentryaction', 'getentriesaction', 'listmyentriesaction', 'getallentriesaction', 'getmetadataaction', 'setmetadataaction', 'setroughcutnameaction', 'getrelatedkshowsaction', 'setentrythumbnailaction', 'collectstatsaction', 'reporterroraction', 'addentryaction', 'getuiconfaction', 'uploadjpegaction', 'getentryaction', 'getkshowaction', 'registerpartneraction')));
}