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


PHP SimpleSAML_Configuration::resolvePath方法代码示例

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


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

示例1: setupTwig

 /**
  * Setup twig.
  */
 private function setupTwig()
 {
     $auto_reload = $this->configuration->getBoolean('template.auto_reload', true);
     $cache = false;
     if (!$auto_reload) {
         // Cache only used if auto_reload = false
         $cache = $this->configuration->getString('template.cache', $this->configuration->resolvePath('cache'));
     }
     // set up template paths
     $loader = $this->setupTwigTemplatepaths();
     // abort if twig template does not exist
     if (!$loader->exists($this->twig_template)) {
         return false;
     }
     // load extra i18n domains
     if ($this->module) {
         $this->localization->addModuleDomain($this->module);
     }
     $options = array('cache' => $cache, 'auto_reload' => $auto_reload, 'translation_function' => array('\\SimpleSAML\\Locale\\Translate', 'translateSingularNativeGettext'), 'translation_function_plural' => array('\\SimpleSAML\\Locale\\Translate', 'translatePluralNativeGettext'));
     // set up translation
     if ($this->localization->i18nBackend === \SimpleSAML\Locale\Localization::GETTEXT_I18N_BACKEND) {
         $options['translation_function'] = array('\\SimpleSAML\\Locale\\Translate', 'translateSingularGettext');
         $options['translation_function_plural'] = array('\\SimpleSAML\\Locale\\Translate', 'translatePluralGettext');
     }
     // TODO: add a branch for the old SimpleSAMLphp backend
     $twig = new Twig_Environment($loader, $options);
     $twig->addExtension(new Twig_Extensions_Extension_I18n());
     return $twig;
 }
开发者ID:simplesamlphp,项目名称:simplesamlphp,代码行数:32,代码来源:Template.php

示例2: __construct

 public function __construct(\SimpleSAML_Configuration $config)
 {
     $storeConfig = $config->getValue('ticketstore', array('directory' => 'ticketcache'));
     if (!is_string($storeConfig['directory'])) {
         throw new Exception('Invalid directory option in config.');
     }
     $path = $config->resolvePath($storeConfig['directory']);
     if (!is_dir($path)) {
         throw new Exception('Directory for CAS Server ticket storage [' . $path . '] does not exists. ');
     }
     if (!is_writable($path)) {
         throw new Exception('Directory for CAS Server ticket storage [' . $path . '] is not writable. ');
     }
     $this->pathToTicketDirectory = preg_replace('/\\/$/', '', $path);
 }
开发者ID:simplesamlphp,项目名称:simplesamlphp-module-casserver,代码行数:15,代码来源:FileSystemTicketStore.php

示例3: __construct

 public function __construct(array $config)
 {
     if (!is_string($config['directory'])) {
         throw new Exception('Invalid directory option in config.');
     }
     $conf = new SimpleSAML_Configuration(array(), '');
     $path = $conf->resolvePath($config['directory']);
     if (!is_dir($path)) {
         throw new Exception('Invalid storage directory [' . $path . '].');
     }
     if (!is_writable($path)) {
         throw new Exception('Storage directory [' . $path . '] is not writable.');
     }
     $this->directory = preg_replace('/\\/$/', '', $path) . '/';
 }
开发者ID:shamus13,项目名称:simplesamlphp-module-oauth2server,代码行数:15,代码来源:FileSystemStore.php

示例4: getDomainLocaleDir

 /**
  * Get the default locale dir for a specific module aka. domain
  *
  * @param string $domain Name of module/domain
  */
 public function getDomainLocaleDir($domain)
 {
     $localeDir = $this->configuration->resolvePath('modules') . '/' . $domain . '/locales';
     return $localeDir;
 }
开发者ID:restena-sw,项目名称:simplesamlphp,代码行数:10,代码来源:Localization.php

示例5: evilObjectCreator

 private function evilObjectCreator($id, $expire)
 {
     $conf = new \SimpleSAML_Configuration(array(), '');
     $path = $conf->resolvePath('tests');
     $filename = $path . '/' . $expire . '-' . $id;
     file_put_contents($filename, serialize(array('jsonString' => array(json_encode('dummy')), 'objectClass' => array('jsonObject'))));
 }
开发者ID:shamus13,项目名称:simplesamlphp-module-oauth2server,代码行数:7,代码来源:FileSystemStoreTest.php


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