本文整理汇总了PHP中ForgeConfig::loadFromFile方法的典型用法代码示例。如果您正苦于以下问题:PHP ForgeConfig::loadFromFile方法的具体用法?PHP ForgeConfig::loadFromFile怎么用?PHP ForgeConfig::loadFromFile使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ForgeConfig
的用法示例。
在下文中一共展示了ForgeConfig::loadFromFile方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: loadConfiguration
private function loadConfiguration()
{
$config_file = 'tests.inc';
ForgeConfig::loadFromFile(dirname(__FILE__) . "/../../src/etc/{$config_file}.dist");
ForgeConfig::loadFromFile(dirname($this->getLocalIncPath()) . "/{$config_file}");
$GLOBALS['sys_dbhost'] = ForgeConfig::get('sys_dbhost');
$GLOBALS['sys_dbuser'] = ForgeConfig::get('sys_dbuser');
$GLOBALS['sys_dbpasswd'] = ForgeConfig::get('sys_dbpasswd');
$GLOBALS['sys_dbname'] = ForgeConfig::get('sys_dbname');
}
示例2: setUp
function setUp()
{
ForgeConfig::store();
ForgeConfig::loadFromFile(dirname(__FILE__) . '/_fixtures/local.inc');
$this->supportedLanguages = ForgeConfig::get('sys_supported_languages');
$this->oldLocale = setlocale(LC_ALL, "0");
setlocale(LC_ALL, 'fr_FR');
$GLOBALS['tmp_dir'] = dirname(__FILE__) . '/_fixtures/var/tmp';
$GLOBALS['sys_custom_incdir'] = $GLOBALS['tmp_dir'];
$GLOBALS['sys_incdir'] = $GLOBALS['tmp_dir'];
}
示例3: insertPhpWikiContent
private function insertPhpWikiContent()
{
echo "Import PhpWiki plugin content \n";
ForgeConfig::loadFromFile($this->getLocalIncPath());
$tuleap_path = ForgeConfig::get('codendi_dir') ? ForgeConfig::get('codendi_dir') : '/tuleap';
$fixture_path = $tuleap_path . '/plugins/phpwiki/tests/_fixtures/rest';
$queries = array("LOAD DATA LOCAL INFILE '" . $fixture_path . "/rest-test-wiki-group-list' INTO TABLE plugin_phpwiki_group_list", "LOAD DATA LOCAL INFILE '" . $fixture_path . "/rest-test-wiki-page' INTO TABLE plugin_phpwiki_page", "LOAD DATA LOCAL INFILE '" . $fixture_path . "/rest-test-wiki-nonempty' INTO TABLE plugin_phpwiki_nonempty", "LOAD DATA LOCAL INFILE '" . $fixture_path . "/rest-test-wiki-version' INTO TABLE plugin_phpwiki_version", "LOAD DATA LOCAL INFILE '" . $fixture_path . "/rest-test-wiki-recent' INTO TABLE plugin_phpwiki_recent");
foreach ($queries as $query) {
$this->mysqli->real_query($query);
}
}
示例4: date_default_timezone_set
if (!ini_get('date.timezone')) {
date_default_timezone_set('Europe/Paris');
}
}
// Defines all of the settings first (hosts, databases, etc.)
$locar_inc_finder = new Config_LocalIncFinder();
$local_inc = $locar_inc_finder->getLocalIncPath();
require $local_inc;
require $GLOBALS['db_config_file'];
ForgeConfig::loadFromFile($GLOBALS['codendi_dir'] . '/src/etc/local.inc.dist');
//load the default settings
ForgeConfig::loadFromFile($local_inc);
ForgeConfig::loadFromFile($GLOBALS['db_config_file']);
if (isset($GLOBALS['DEBUG_MODE'])) {
ForgeConfig::loadFromFile($GLOBALS['codendi_dir'] . '/src/etc/development.inc.dist');
ForgeConfig::loadFromFile(dirname($local_inc) . '/development.inc');
}
ForgeConfig::loadFromDatabase();
// Fix path if needed
if (isset($GLOBALS['htmlpurifier_dir'])) {
ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . $GLOBALS['htmlpurifier_dir']);
}
if (isset($GLOBALS['jpgraph_dir'])) {
ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . $GLOBALS['jpgraph_dir']);
}
define('TTF_DIR', isset($GLOBALS['ttf_font_dir']) ? $GLOBALS['ttf_font_dir'] : '/usr/share/fonts/');
$xml_security = new XML_Security();
$xml_security->disableExternalLoadOfEntities();
// Detect whether this file is called by a script running in cli mode, or in normal web mode
if (!defined('IS_SCRIPT')) {
if (php_sapi_name() == "cli") {
示例5: itDoesntEmitAnyNoticesOrWarningsWhenThereAreTwoRestoresAndOneLoad
public function itDoesntEmitAnyNoticesOrWarningsWhenThereAreTwoRestoresAndOneLoad()
{
ForgeConfig::restore();
ForgeConfig::restore();
ForgeConfig::loadFromFile(dirname(__FILE__) . '/_fixtures/config/local.inc');
}