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


PHP SimpleSAML_Configuration::getConfig方法代码示例

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


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

示例1: delete

 /**
  * Delete the ARP identified by the aid.
  *
  * @return PDOStatement|false The statement or false on error.
  */
 public function delete()
 {
     if (empty($this->_aid)) {
         SimpleSAML_Logger::error('JANUS:ARP:delete - aid needs to be set.');
         return false;
     }
     $deleteStatement = $this->execute('UPDATE ' . self::$prefix . 'arp SET
         `deleted` = ?
         WHERE `aid` = ?;', array(date('c'), $this->_aid));
     if ($deleteStatement === false) {
         return false;
     }
     // Get all entities with the just removed ARP
     $st = $this->execute('SELECT eid
         FROM ' . self::$prefix . 'entity
         WHERE `arp` = ?;', array($this->_aid));
     if (!$st) {
         return $deleteStatement;
     }
     $janus_config = SimpleSAML_Configuration::getConfig('module_janus.php');
     $controller = new sspmod_janus_EntityController($janus_config);
     // Remove the ARP from all entities
     $entity_rows = $st->fetchAll();
     foreach ($entity_rows as $entity_row) {
         $controller->setEntity($entity_row['eid']);
         $controller->loadEntity();
         $controller->setArp('0');
         $controller->saveEntity();
     }
     return $deleteStatement;
 }
开发者ID:newlongwhitecloudy,项目名称:OpenConext-serviceregistry,代码行数:36,代码来源:ARP.php

示例2: __construct

 /**
  * instantiate the postman
  *
  * @since Method available since Release 1.2.0
  */
 public function __construct()
 {
     $this->_config = SimpleSAML_Configuration::getConfig('module_janus.php');
     // Send DB config to parent class
     parent::__construct($this->_config->getValue('store'));
     $this->_paginate = $this->_config->getValue('dashboard.inbox.paginate_by', 20);
 }
开发者ID:newlongwhitecloudy,项目名称:OpenConext-serviceregistry,代码行数:12,代码来源:Postman.php

示例3: statistics_hook_cron

/**
 * Hook to run a cron job.
 *
 * @param array &$croninfo  Output
 */
function statistics_hook_cron(&$croninfo)
{
    assert('is_array($croninfo)');
    assert('array_key_exists("summary", $croninfo)');
    assert('array_key_exists("tag", $croninfo)');
    $statconfig = SimpleSAML_Configuration::getConfig('module_statistics.php');
    if (is_null($statconfig->getValue('cron_tag', NULL))) {
        return;
    }
    if ($statconfig->getValue('cron_tag', NULL) !== $croninfo['tag']) {
        return;
    }
    $maxtime = $statconfig->getInteger('time_limit', NULL);
    if ($maxtime) {
        set_time_limit($maxtime);
    }
    try {
        $aggregator = new sspmod_statistics_Aggregator();
        $results = $aggregator->aggregate();
        if (empty($results)) {
            SimpleSAML\Logger::notice('Output from statistics aggregator was empty.');
        } else {
            $aggregator->store($results);
        }
    } catch (Exception $e) {
        $message = 'Loganalyzer threw exception: ' . $e->getMessage();
        SimpleSAML\Logger::warning($message);
        $croninfo['summary'][] = $message;
    }
}
开发者ID:SysBind,项目名称:simplesamlphp,代码行数:35,代码来源:hook_cron.php

示例4: sanitycheck_hook_cron

/**
 * Hook to run a cron job.
 *
 * @param array &$croninfo  Output
 */
function sanitycheck_hook_cron(&$croninfo)
{
    assert('is_array($croninfo)');
    assert('array_key_exists("summary", $croninfo)');
    assert('array_key_exists("tag", $croninfo)');
    SimpleSAML_Logger::info('cron [sanitycheck]: Running cron in cron tag [' . $croninfo['tag'] . '] ');
    try {
        $sconfig = SimpleSAML_Configuration::getConfig('config-sanitycheck.php');
        if (is_null($sconfig->getValue('cron_tag', NULL))) {
            return;
        }
        if ($sconfig->getValue('cron_tag', NULL) !== $croninfo['tag']) {
            return;
        }
        $info = array();
        $errors = array();
        $hookinfo = array('info' => &$info, 'errors' => &$errors);
        SimpleSAML_Module::callHooks('sanitycheck', $hookinfo);
        if (count($errors) > 0) {
            foreach ($errors as $err) {
                $croninfo['summary'][] = 'Sanitycheck error: ' . $err;
            }
        }
    } catch (Exception $e) {
        $croninfo['summary'][] = 'Error executing sanity check: ' . $e->getMessage();
    }
}
开发者ID:filonuse,项目名称:fedlab,代码行数:32,代码来源:hook_cron.php

示例5: statistics_hook_sanitycheck

/**
 * Hook to do santity checks
 *
 * @param array &$hookinfo  hookinfo
 */
function statistics_hook_sanitycheck(&$hookinfo)
{
    assert('is_array($hookinfo)');
    assert('array_key_exists("errors", $hookinfo)');
    assert('array_key_exists("info", $hookinfo)');
    try {
        $statconfig = SimpleSAML_Configuration::getConfig('module_statistics.php');
    } catch (Exception $e) {
        $hookinfo['errors'][] = '[statistics] Could not get configuration: ' . $e->getMessage();
        return;
    }
    $statdir = $statconfig->getValue('statdir');
    $inputfile = $statconfig->getValue('inputfile');
    if (file_exists($statdir)) {
        $hookinfo['info'][] = '[statistics] Statistics dir [' . $statdir . '] exists';
        if (is_writable($statdir)) {
            $hookinfo['info'][] = '[statistics] Statistics dir [' . $statdir . '] is writable';
        } else {
            $hookinfo['errors'][] = '[statistics] Statistics dir [' . $statdir . '] is not writable';
        }
    } else {
        $hookinfo['errors'][] = '[statistics] Statistics dir [' . $statdir . '] does not exists';
    }
    if (file_exists($inputfile)) {
        $hookinfo['info'][] = '[statistics] Input file [' . $inputfile . '] exists';
    } else {
        $hookinfo['errors'][] = '[statistics] Input file [' . $inputfile . '] does not exists';
    }
}
开发者ID:danielkjfrog,项目名称:docker,代码行数:34,代码来源:hook_sanitycheck.php

示例6: _loadEntityMetadata

 protected function _loadEntityMetadata($entityId)
 {
     $janusConfig = SimpleSAML_Configuration::getConfig('module_janus.php');
     $entityController = new sspmod_janus_EntityController($janusConfig);
     $entityController->setEntity($entityId);
     $entityController->loadEntity();
     $this->_entityMetadata = $entityController->getMetaArray();
 }
开发者ID:newlongwhitecloudy,项目名称:OpenConext-serviceregistry,代码行数:8,代码来源:get-entity-endpoints.php

示例7: __construct

 /**
  * Initialize the SQL datastore.
  */
 protected function __construct()
 {
     $config = \SimpleSAML_Configuration::getInstance();
     $dbalconfig = \SimpleSAML_Configuration::getConfig('module_dbal.php');
     $this->prefix = $config->getString('store.sql.prefix', 'simpleSAMLphp');
     $this->kvstorePrefix = $this->prefix . '_kvstore';
     $connectionParams = array('driver' => $dbalconfig->getString('store.dbal.driver'), 'user' => $dbalconfig->getString('store.dbal.user', null), 'password' => $dbalconfig->getString('store.dbal.password', null), 'host' => $dbalconfig->getString('store.dbal.host', 'localhost'), 'dbname' => $dbalconfig->getString('store.dbal.dbname'));
     $this->conn = DriverManager::getConnection($connectionParams);
 }
开发者ID:sgomez,项目名称:simplesamlphp-module-dbal,代码行数:12,代码来源:DBAL.php

示例8: _loadEntity

 protected function _loadEntity($entityId)
 {
     $janusConfig = SimpleSAML_Configuration::getConfig('module_janus.php');
     $entityController = new sspmod_janus_EntityController($janusConfig);
     $entityController->setEntity($entityId);
     $entityController->loadEntity();
     $this->_entityController = $entityController;
     return $entityController ? true : false;
 }
开发者ID:newlongwhitecloudy,项目名称:OpenConext-serviceregistry,代码行数:9,代码来源:get-entity-metadata-validations.php

示例9: cron_hook_cron

/**
 * Hook to run a cron job.
 *
 * @param array &$croninfo  Output
 */
function cron_hook_cron(&$croninfo)
{
    assert('is_array($croninfo)');
    assert('array_key_exists("summary", $croninfo)');
    assert('array_key_exists("tag", $croninfo)');
    $cronconfig = SimpleSAML_Configuration::getConfig('module_cron.php');
    if ($cronconfig->getValue('debug_message', TRUE)) {
        $croninfo['summary'][] = 'Cron did run tag [' . $croninfo['tag'] . '] at ' . date(DATE_RFC822);
    }
}
开发者ID:PitcherAG,项目名称:simplesamlphp,代码行数:15,代码来源:hook_cron.php

示例10: __construct

 /**
  * Initializes this discovery service.
  *
  * The constructor does the parsing of the request. If this is an invalid request, it will
  * throw an exception.
  *
  * @param array $metadataSets  Array with metadata sets we find remote entities in.
  * @param string $instance  The name of this instance of the discovery service.
  */
 public function __construct(array $metadataSets, $instance)
 {
     parent::__construct($metadataSets, $instance);
     $this->discoconfig = SimpleSAML_Configuration::getConfig('module_discopower.php');
     $this->cdcDomain = $this->discoconfig->getString('cdc.domain', NULL);
     if ($this->cdcDomain !== NULL && $this->cdcDomain[0] !== '.') {
         /* Ensure that the CDC domain starts with a dot ('.') as required by the spec. */
         $this->cdcDomain = '.' . $this->cdcDomain;
     }
     $this->cdcLifetime = $this->discoconfig->getInteger('cdc.lifetime', NULL);
 }
开发者ID:shirlei,项目名称:simplesaml,代码行数:20,代码来源:PowerIdPDisco.php

示例11: __construct

 protected function __construct()
 {
     $config = SimpleSAML_Configuration::getConfig('module_riak.php');
     $path = $config->getString('path', 'riak-php-client/riak.php');
     $host = $config->getString('host', 'localhost');
     $port = $config->getString('port', 8098);
     $bucket = $config->getString('bucket', 'simpleSAMLphp');
     require_once $path;
     $this->client = new RiakClient($host, $port);
     $this->bucket = $this->client->bucket($bucket);
 }
开发者ID:Stony-Brook-University,项目名称:doitsbu,代码行数:11,代码来源:Store.php

示例12: __construct

 /**
  * Constructor
  */
 public function __construct($inputfile = NULL)
 {
     $this->statconfig = SimpleSAML_Configuration::getConfig('module_statistics.php');
     $this->statdir = $this->statconfig->getValue('statdir');
     $this->inputfile = $this->statconfig->getValue('inputfile');
     $this->statrules = $this->statconfig->getValue('statrules');
     $this->offset = $this->statconfig->getValue('offset', 0);
     if (isset($inputfile)) {
         $this->inputfile = $inputfile;
     }
 }
开发者ID:PitcherAG,项目名称:simplesamlphp,代码行数:14,代码来源:LogCleaner.php

示例13: instantiateLdapStorage

 private static function instantiateLdapStorage()
 {
     $selfRegConf = SimpleSAML_Configuration::getConfig('module_selfregister.php');
     $writeConf = $selfRegConf->getArray('ldap');
     $auth = $selfRegConf->getString('auth');
     $authsources = SimpleSAML_Configuration::getConfig('authsources.php');
     $authConf = $authsources->getArray($auth);
     $attributes = $selfRegConf->getArray('attributes');
     $ldap = new sspmod_selfregister_Storage_LdapMod($authConf, $writeConf, $attributes);
     return $ldap;
 }
开发者ID:googlecode-mirror,项目名称:simplesamlphp-labs,代码行数:11,代码来源:UserCatalogue.php

示例14: checkLoggedAndSameAuth

 public static function checkLoggedAndSameAuth()
 {
     $session = SimpleSAML_Session::getSessionFromRequest();
     $uregconf = SimpleSAML_Configuration::getConfig('module_selfregister.php');
     $asId = $uregconf->getString('auth');
     $as = new SimpleSAML_Auth_Simple($asId);
     if ($as->isAuthenticated()) {
         return $as;
     }
     return false;
 }
开发者ID:GEANT,项目名称:simplesamlphp-module-selfregister,代码行数:11,代码来源:Util.php

示例15: instantiateSqlStorage

 private static function instantiateSqlStorage()
 {
     $authsources = SimpleSAML_Configuration::getConfig('authsources.php');
     $selAuthSource = self::getAuthSourceSelection();
     $authConf = $authsources->getArray($selAuthSource);
     $selfRegConf = SimpleSAML_Configuration::getConfig('module_selfregister.php');
     $attributes = $selfRegConf->getArray('attributes');
     $writeConf = $selfRegConf->getArray('sql');
     $hashAlgo = $selfRegConf->getString('hash.algo');
     $sql = new sspmod_selfregister_Storage_SqlMod($authConf, $writeConf, $attributes, $hashAlgo);
     return $sql;
 }
开发者ID:GEANT,项目名称:simplesamlphp-module-selfregister,代码行数:12,代码来源:UserCatalogue.php


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