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


PHP Config::resolvePath方法代码示例

本文整理汇总了PHP中Icinga\Application\Config::resolvePath方法的典型用法代码示例。如果您正苦于以下问题:PHP Config::resolvePath方法的具体用法?PHP Config::resolvePath怎么用?PHP Config::resolvePath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Icinga\Application\Config的用法示例。


在下文中一共展示了Config::resolvePath方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getReport

 public function getReport()
 {
     if ($this->error === false) {
         return array(sprintf(mt('setup', 'General configuration has been successfully written to: %s'), Config::resolvePath('config.ini')));
     } elseif ($this->error !== null) {
         return array(sprintf(mt('setup', 'General configuration could not be written to: %s. An error occured:'), Config::resolvePath('config.ini')), sprintf(mt('setup', 'ERROR: %s'), IcingaException::describe($this->error)));
     }
 }
开发者ID:0svald,项目名称:icingaweb2,代码行数:8,代码来源:GeneralConfigStep.php

示例2: getReport

 public function getReport()
 {
     if ($this->error === false) {
         return array(sprintf(mt('monitoring', 'Monitoring instance configuration has been successfully created: %s'), Config::resolvePath('modules/monitoring/instances.ini')));
     } elseif ($this->error !== null) {
         return array(sprintf(mt('monitoring', 'Monitoring instance configuration could not be written to: %s. An error occured:'), Config::resolvePath('modules/monitoring/instances.ini')), sprintf(mt('setup', 'ERROR: %s'), $this->error->getMessage()));
     }
 }
开发者ID:hsanjuan,项目名称:icingaweb2,代码行数:8,代码来源:InstanceStep.php

示例3: getReport

 public function getReport()
 {
     if ($this->error === false) {
         $message = mt('monitoring', 'Monitoring instance configuration has been successfully created: %s');
         return '<p>' . sprintf($message, Config::resolvePath('modules/monitoring/instances.ini')) . '</p>';
     } elseif ($this->error !== null) {
         $message = mt('monitoring', 'Monitoring instance configuration could not be written to: %s; An error occured:');
         return '<p class="error">' . sprintf($message, Config::resolvePath('modules/monitoring/instances.ini')) . '</p><p>' . $this->error->getMessage() . '</p>';
     }
 }
开发者ID:xert,项目名称:icingaweb2,代码行数:10,代码来源:InstanceStep.php

示例4: getReport

 public function getReport()
 {
     if ($this->error === false) {
         $message = mt('setup', 'General configuration has been successfully written to: %s');
         return '<p>' . sprintf($message, Config::resolvePath('config.ini')) . '</p>';
     } elseif ($this->error !== null) {
         $message = mt('setup', 'General configuration could not be written to: %s; An error occured:');
         return '<p class="error">' . sprintf($message, Config::resolvePath('config.ini')) . '</p>' . '<p>' . $this->error->getMessage() . '</p>';
     }
 }
开发者ID:xert,项目名称:icingaweb2,代码行数:10,代码来源:GeneralConfigStep.php

示例5: getReport

 public function getReport()
 {
     $report = array();
     if ($this->backendIniError === false) {
         $report[] = sprintf(mt('monitoring', 'Monitoring backend configuration has been successfully written to: %s'), Config::resolvePath('modules/monitoring/backends.ini'));
     } elseif ($this->backendIniError !== null) {
         $report[] = sprintf(mt('monitoring', 'Monitoring backend configuration could not be written to: %s. An error occured:'), Config::resolvePath('modules/monitoring/backends.ini'));
         $report[] = sprintf(mt('setup', 'ERROR: %s'), $this->backendIniError->getMessage());
     }
     if ($this->resourcesIniError === false) {
         $report[] = sprintf(mt('monitoring', 'Resource configuration has been successfully updated: %s'), Config::resolvePath('resources.ini'));
     } elseif ($this->resourcesIniError !== null) {
         $report[] = sprintf(mt('monitoring', 'Resource configuration could not be udpated: %s. An error occured:'), Config::resolvePath('resources.ini'));
         $report[] = sprintf(mt('setup', 'ERROR: %s'), $this->resourcesIniError->getMessage());
     }
     return $report;
 }
开发者ID:hsanjuan,项目名称:icingaweb2,代码行数:17,代码来源:BackendStep.php

示例6: getReport

 public function getReport()
 {
     $report = '';
     if ($this->backendIniError === false) {
         $message = mt('monitoring', 'Monitoring backend configuration has been successfully written to: %s');
         $report .= '<p>' . sprintf($message, Config::resolvePath('modules/monitoring/backends.ini')) . '</p>';
     } elseif ($this->backendIniError !== null) {
         $message = mt('monitoring', 'Monitoring backend configuration could not be written to: %s; An error occured:');
         $report .= '<p class="error">' . sprintf($message, Config::resolvePath('modules/monitoring/backends.ini')) . '</p><p>' . $this->backendIniError->getMessage() . '</p>';
     }
     if ($this->resourcesIniError === false) {
         $message = mt('monitoring', 'Resource configuration has been successfully updated: %s');
         $report .= '<p>' . sprintf($message, Config::resolvePath('resources.ini')) . '</p>';
     } elseif ($this->resourcesIniError !== null) {
         $message = mt('monitoring', 'Resource configuration could not be udpated: %s; An error occured:');
         $report .= '<p class="error">' . sprintf($message, Config::resolvePath('resources.ini')) . '</p>' . '<p>' . $this->resourcesIniError->getMessage() . '</p>';
     }
     return $report;
 }
开发者ID:xert,项目名称:icingaweb2,代码行数:19,代码来源:BackendStep.php

示例7: getConfigFile

 /**
  * Get config file
  *
  * @return string
  */
 public function getConfigFile()
 {
     if ($this->user === null) {
         throw new ProgrammingError('Can\'t load dashboards. User is not set');
     }
     return Config::resolvePath('dashboards/' . $this->user->getUsername() . '/dashboard.ini');
 }
开发者ID:JakobGM,项目名称:icingaweb2,代码行数:12,代码来源:Dashboard.php

示例8: getReport

 public function getReport()
 {
     $report = '';
     if ($this->authIniError === false) {
         $message = mt('setup', 'Authentication configuration has been successfully written to: %s');
         $report .= '<p>' . sprintf($message, Config::resolvePath('authentication.ini')) . '</p>';
     } elseif ($this->authIniError !== null) {
         $message = mt('setup', 'Authentication configuration could not be written to: %s; An error occured:');
         $report .= '<p class="error">' . sprintf($message, Config::resolvePath('authentication.ini')) . '</p>' . '<p>' . $this->authIniError->getMessage() . '</p>';
     }
     if ($this->dbError === false) {
         $message = mt('setup', 'Account "%s" has been successfully created.');
         $report .= '<p>' . sprintf($message, $this->data['adminAccountData']['username']) . '</p>';
     } elseif ($this->dbError !== null) {
         $message = mt('setup', 'Unable to create account "%s". An error occured:');
         $report .= '<p class="error">' . sprintf($message, $this->data['adminAccountData']['username']) . '</p>' . '<p>' . $this->dbError->getMessage() . '</p>';
     }
     if ($this->permIniError === false) {
         $message = mt('setup', 'Account "%s" has been successfully defined as initial administrator.');
         $report .= '<p>' . sprintf($message, $this->data['adminAccountData']['username']) . '</p>';
     } elseif ($this->permIniError !== null) {
         $message = mt('setup', 'Unable to define account "%s" as initial administrator. An error occured:');
         $report .= '<p class="error">' . sprintf($message, $this->data['adminAccountData']['username']) . '</p>' . '<p>' . $this->permIniError->getMessage() . '</p>';
     }
     return $report;
 }
开发者ID:xert,项目名称:icingaweb2,代码行数:26,代码来源:AuthenticationStep.php

示例9: getReport

 public function getReport()
 {
     $report = array();
     if ($this->groupIniError === false) {
         $report[] = sprintf(mt('setup', 'User Group Backend configuration has been successfully written to: %s'), Config::resolvePath('groups.ini'));
     } elseif ($this->groupIniError !== null) {
         $report[] = sprintf(mt('setup', 'User Group Backend configuration could not be written to: %s. An error occured:'), Config::resolvePath('groups.ini'));
         $report[] = sprintf(mt('setup', 'ERROR: %s'), IcingaException::describe($this->groupIniError));
     }
     if ($this->groupError === false) {
         $report[] = sprintf(mt('setup', 'User Group "%s" has been successfully created.'), mt('setup', 'Administrators', 'setup.role.name'));
     } elseif ($this->groupError !== null) {
         $report[] = sprintf(mt('setup', 'Unable to create user group "%s". An error occured:'), mt('setup', 'Administrators', 'setup.role.name'));
         $report[] = sprintf(mt('setup', 'ERROR: %s'), IcingaException::describe($this->groupError));
     }
     if ($this->memberError === false) {
         $report[] = sprintf(mt('setup', 'Account "%s" has been successfully added as member to user group "%s".'), $this->data['username'], mt('setup', 'Administrators', 'setup.role.name'));
     } elseif ($this->memberError !== null) {
         $report[] = sprintf(mt('setup', 'Unable to add account "%s" as member to user group "%s". An error occured:'), $this->data['username'], mt('setup', 'Administrators', 'setup.role.name'));
         $report[] = sprintf(mt('setup', 'ERROR: %s'), IcingaException::describe($this->memberError));
     }
     return $report;
 }
开发者ID:NerdGZ,项目名称:icingaweb2,代码行数:23,代码来源:UserGroupStep.php

示例10: getReport

 public function getReport()
 {
     $report = array();
     if ($this->authIniError === false) {
         $report[] = sprintf(mt('setup', 'Authentication configuration has been successfully written to: %s'), Config::resolvePath('authentication.ini'));
     } elseif ($this->authIniError !== null) {
         $report[] = sprintf(mt('setup', 'Authentication configuration could not be written to: %s. An error occured:'), Config::resolvePath('authentication.ini'));
         $report[] = sprintf(mt('setup', 'ERROR: %s'), $this->authIniError->getMessage());
     }
     if ($this->dbError === false) {
         $report[] = sprintf(mt('setup', 'Account "%s" has been successfully created.'), $this->data['adminAccountData']['username']);
     } elseif ($this->dbError !== null) {
         $report[] = sprintf(mt('setup', 'Unable to create account "%s". An error occured:'), $this->data['adminAccountData']['username']);
         $report[] = sprintf(mt('setup', 'ERROR: %s'), $this->dbError->getMessage());
     }
     if ($this->permIniError === false) {
         $report[] = sprintf(mt('setup', 'Account "%s" has been successfully defined as initial administrator.'), $this->data['adminAccountData']['username']);
     } elseif ($this->permIniError !== null) {
         $report[] = sprintf(mt('setup', 'Unable to define account "%s" as initial administrator. An error occured:'), $this->data['adminAccountData']['username']);
         $report[] = sprintf(mt('setup', 'ERROR: %s'), $this->permIniError->getMessage());
     }
     return $report;
 }
开发者ID:hsanjuan,项目名称:icingaweb2,代码行数:23,代码来源:AuthenticationStep.php

示例11: setupTokenExists

 /**
  * Get whether the setup token exists
  *
  * @return bool
  */
 public function setupTokenExists()
 {
     return @file_exists($this->config->resolvePath('setup.token'));
 }
开发者ID:kobmaki,项目名称:icingaweb2,代码行数:9,代码来源:ApplicationBootstrap.php

示例12: clearSession

 /**
  * Clear the session being used by this wizard and drop the setup token
  */
 public function clearSession()
 {
     parent::clearSession();
     $tokenPath = Config::resolvePath('setup.token');
     if (file_exists($tokenPath)) {
         @unlink($tokenPath);
     }
 }
开发者ID:hsanjuan,项目名称:icingaweb2,代码行数:11,代码来源:WebWizard.php

示例13: create

 /**
  * Create preferences storage adapter from config
  *
  * @param   ConfigObject    $config     The config for the adapter
  * @param   User            $user       The user to which these preferences belong
  *
  * @return  self
  *
  * @throws  ConfigurationError          When the configuration defines an invalid storage type
  */
 public static function create(ConfigObject $config, User $user)
 {
     $type = ucfirst(strtolower($config->get('store', 'ini')));
     $storeClass = 'Icinga\\User\\Preferences\\Store\\' . $type . 'Store';
     if (!class_exists($storeClass)) {
         throw new ConfigurationError('Preferences configuration defines an invalid storage type. Storage type %s not found', $type);
     }
     if ($type === 'Ini') {
         $config->location = Config::resolvePath('preferences');
     } elseif ($type === 'Db') {
         $config->connection = new DbConnection(ResourceFactory::getResourceConfig($config->resource));
     }
     return new $storeClass($config, $user);
 }
开发者ID:0svald,项目名称:icingaweb2,代码行数:24,代码来源:PreferencesStore.php

示例14: loadNavigationConfig

 /**
  * Load and return this user's navigation configuration
  *
  * @return  Config
  */
 public function loadNavigationConfig()
 {
     return Config::fromIni(Config::resolvePath('preferences') . DIRECTORY_SEPARATOR . $this->getUsername() . DIRECTORY_SEPARATOR . 'navigation.ini');
 }
开发者ID:AndHab,项目名称:icingaweb2,代码行数:9,代码来源:User.php

示例15: getReport

 public function getReport()
 {
     $report = array();
     if ($this->authIniError === false) {
         $report[] = sprintf(mt('setup', 'Authentication configuration has been successfully written to: %s'), Config::resolvePath('authentication.ini'));
     } elseif ($this->authIniError !== null) {
         $report[] = sprintf(mt('setup', 'Authentication configuration could not be written to: %s. An error occured:'), Config::resolvePath('authentication.ini'));
         $report[] = sprintf(mt('setup', 'ERROR: %s'), IcingaException::describe($this->authIniError));
     }
     if ($this->dbError === false) {
         $report[] = sprintf(mt('setup', 'Account "%s" has been successfully created.'), $this->data['adminAccountData']['username']);
     } elseif ($this->dbError !== null) {
         $report[] = sprintf(mt('setup', 'Unable to create account "%s". An error occured:'), $this->data['adminAccountData']['username']);
         $report[] = sprintf(mt('setup', 'ERROR: %s'), IcingaException::describe($this->dbError));
     }
     if ($this->permIniError === false) {
         $report[] = isset($this->data['adminAccountData']['username']) ? sprintf(mt('setup', 'Account "%s" has been successfully defined as initial administrator.'), $this->data['adminAccountData']['username']) : sprintf(mt('setup', 'The members of the user group "%s" were successfully defined as initial administrators.'), $this->data['adminAccountData']['groupname']);
     } elseif ($this->permIniError !== null) {
         $report[] = isset($this->data['adminAccountData']['username']) ? sprintf(mt('setup', 'Unable to define account "%s" as initial administrator. An error occured:'), $this->data['adminAccountData']['username']) : sprintf(mt('setup', 'Unable to define the members of the user group "%s" as initial administrators. An error occured:'), $this->data['adminAccountData']['groupname']);
         $report[] = sprintf(mt('setup', 'ERROR: %s'), IcingaException::describe($this->permIniError));
     }
     return $report;
 }
开发者ID:0svald,项目名称:icingaweb2,代码行数:23,代码来源:AuthenticationStep.php


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