本文整理汇总了PHP中PhabricatorEnv::getAllConfigKeys方法的典型用法代码示例。如果您正苦于以下问题:PHP PhabricatorEnv::getAllConfigKeys方法的具体用法?PHP PhabricatorEnv::getAllConfigKeys怎么用?PHP PhabricatorEnv::getAllConfigKeys使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PhabricatorEnv
的用法示例。
在下文中一共展示了PhabricatorEnv::getAllConfigKeys方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: generateData
public function generateData()
{
$lib_data = array();
foreach (PhutilBootloader::getInstance()->getAllLibraries() as $lib) {
$lib_data[$lib] = phutil_get_library_root($lib);
}
return array('config' => PhabricatorEnv::getAllConfigKeys(), 'libraries' => $lib_data);
}
示例2: executeChecks
protected function executeChecks()
{
$ancient_config = self::getAncientConfig();
$all_keys = PhabricatorEnv::getAllConfigKeys();
$all_keys = array_keys($all_keys);
sort($all_keys);
$defined_keys = PhabricatorApplicationConfigOptions::loadAllOptions();
foreach ($all_keys as $key) {
if (isset($defined_keys[$key])) {
continue;
}
if (isset($ancient_config[$key])) {
$summary = pht('This option has been removed. You may delete it at your ' . 'convenience.');
$message = pht("The configuration option '%s' has been removed. You may delete " . "it at your convenience." . "\n\n%s", $key, $ancient_config[$key]);
$short = pht('Obsolete Config');
$name = pht('Obsolete Configuration Option "%s"', $key);
} else {
$summary = pht('This option is not recognized. It may be misspelled.');
$message = pht("The configuration option '%s' is not recognized. It may be " . "misspelled, or it might have existed in an older version of " . "Phabricator. It has no effect, and should be corrected or deleted.", $key);
$short = pht('Unknown Config');
$name = pht('Unknown Configuration Option "%s"', $key);
}
$issue = $this->newIssue('config.unknown.' . $key)->setShortName($short)->setName($name)->setSummary($summary);
$stack = PhabricatorEnv::getConfigSourceStack();
$stack = $stack->getStack();
$found = array();
$found_local = false;
$found_database = false;
foreach ($stack as $source_key => $source) {
$value = $source->getKeys(array($key));
if ($value) {
$found[] = $source->getName();
if ($source instanceof PhabricatorConfigDatabaseSource) {
$found_database = true;
}
if ($source instanceof PhabricatorConfigLocalSource) {
$found_local = true;
}
}
}
$message = $message . "\n\n" . pht('This configuration value is defined in these %d ' . 'configuration source(s): %s.', count($found), implode(', ', $found));
$issue->setMessage($message);
if ($found_local) {
$command = csprintf('phabricator/ $ ./bin/config delete %s', $key);
$issue->addCommand($command);
}
if ($found_database) {
$issue->addPhabricatorConfig($key);
}
}
$this->executeManiphestFieldChecks();
}