本文整理汇总了PHP中OCP\IConfig::getAppKeys方法的典型用法代码示例。如果您正苦于以下问题:PHP IConfig::getAppKeys方法的具体用法?PHP IConfig::getAppKeys怎么用?PHP IConfig::getAppKeys使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OCP\IConfig
的用法示例。
在下文中一共展示了IConfig::getAppKeys方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: run
public function run(IOutput $out)
{
$keys = $this->config->getAppKeys('files_sharing');
foreach ($keys as $key) {
if (is_numeric($key)) {
$this->config->deleteAppValue('files_sharing', $key);
}
}
}
示例2: execute
protected function execute(InputInterface $input, OutputInterface $output)
{
$appName = $input->getArgument('app');
$configName = $input->getArgument('name');
if ($input->hasParameterOption('--error-if-not-exists') && !in_array($configName, $this->config->getAppKeys($appName))) {
$output->writeln('<error>Config ' . $configName . ' of app ' . $appName . ' could not be deleted because it did not exist</error>');
return 1;
}
$this->config->deleteAppValue($appName, $configName);
$output->writeln('<info>Config value ' . $configName . ' of app ' . $appName . ' deleted</info>');
return 0;
}
示例3: execute
protected function execute(InputInterface $input, OutputInterface $output)
{
$appName = $input->getArgument('app');
$configName = $input->getArgument('name');
if (!in_array($configName, $this->config->getAppKeys($appName)) && $input->hasParameterOption('--update-only')) {
$output->writeln('<comment>Config value ' . $configName . ' for app ' . $appName . ' not updated, as it has not been set before.</comment>');
return 1;
}
$configValue = $input->getOption('value');
$this->config->setAppValue($appName, $configName, $configValue);
$output->writeln('<info>Config value ' . $configName . ' for app ' . $appName . ' set to ' . $configValue . '</info>');
return 0;
}
示例4: getDirtyMountPoints
/**
* Get all mountpoints we need to update the etag for
*
* @return string[]
*/
protected function getDirtyMountPoints()
{
$dirty = array();
$mountPoints = $this->config->getAppKeys('files_external');
foreach ($mountPoints as $mountPoint) {
if (substr($mountPoint, 0, 1) === '/') {
$updateTime = $this->config->getAppValue('files_external', $mountPoint);
$userTime = $this->config->getUserValue($this->user->getUID(), 'files_external', $mountPoint);
if ($updateTime > $userTime) {
$dirty[] = $mountPoint;
}
}
}
return $dirty;
}
示例5: execute
/**
* Executes the current command.
*
* @param InputInterface $input An InputInterface instance
* @param OutputInterface $output An OutputInterface instance
* @return null|int null or 0 if everything went fine, or an error code
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
$appName = $input->getArgument('app');
$configName = $input->getArgument('name');
$defaultValue = $input->getOption('default-value');
if (!in_array($configName, $this->config->getAppKeys($appName)) && !$input->hasParameterOption('--default-value')) {
return 1;
}
if (!in_array($configName, $this->config->getAppKeys($appName))) {
$configValue = $defaultValue;
} else {
$configValue = $this->config->getAppValue($appName, $configName);
}
$this->writeMixedInOutputFormat($input, $output, $configValue);
return 0;
}
示例6: releaseAll
/**
* @param array $parameters
* @return \OC_OCS_Result
*/
public function releaseAll(array $parameters)
{
$type = $this->getType($parameters);
$lockingProvider = $this->getLockingProvider();
foreach ($this->config->getAppKeys('testing') as $lock) {
if (strpos($lock, 'locking_') === 0) {
$path = substr($lock, strlen('locking_'));
if ($type === ILockingProvider::LOCK_EXCLUSIVE && $this->config->getAppValue('testing', $lock) == ILockingProvider::LOCK_EXCLUSIVE) {
$lockingProvider->releaseLock($path, $this->config->getAppValue('testing', $lock));
} else {
if ($type === ILockingProvider::LOCK_SHARED && $this->config->getAppValue('testing', $lock) == ILockingProvider::LOCK_SHARED) {
$lockingProvider->releaseLock($path, $this->config->getAppValue('testing', $lock));
} else {
$lockingProvider->releaseLock($path, $this->config->getAppValue('testing', $lock));
}
}
}
}
return new \OC_OCS_Result(null, 100);
}