当前位置: 首页>>代码示例>>PHP>>正文


PHP IConfig::getAppKeys方法代码示例

本文整理汇总了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);
         }
     }
 }
开发者ID:stweil,项目名称:owncloud-core,代码行数:9,代码来源:SharePropagation.php

示例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;
 }
开发者ID:kenwi,项目名称:core,代码行数:12,代码来源:deleteconfig.php

示例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;
 }
开发者ID:kenwi,项目名称:core,代码行数:13,代码来源:setconfig.php

示例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;
 }
开发者ID:Kevin-ZK,项目名称:vaneDisk,代码行数:20,代码来源:etagpropagator.php

示例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;
 }
开发者ID:GitHubUser4234,项目名称:core,代码行数:23,代码来源:GetConfig.php

示例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);
 }
开发者ID:rchicoli,项目名称:owncloud-core,代码行数:24,代码来源:provisioning.php


注:本文中的OCP\IConfig::getAppKeys方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。