本文整理汇总了PHP中SimpleSAML_Logger::setCaptureLog方法的典型用法代码示例。如果您正苦于以下问题:PHP SimpleSAML_Logger::setCaptureLog方法的具体用法?PHP SimpleSAML_Logger::setCaptureLog怎么用?PHP SimpleSAML_Logger::setCaptureLog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SimpleSAML_Logger
的用法示例。
在下文中一共展示了SimpleSAML_Logger::setCaptureLog方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$results = array();
} elseif (array_key_exists('reset', $_GET) && $_GET['reset'] === '1') {
$results = array();
}
#echo('<pre>'); print_r($results); exit;
$start = microtime(TRUE);
$previous = microtime(TRUE);
$maxtime = $ldapStatusConfig->getValue('maxExecutionTime', 15);
if (array_key_exists('orgtest', $_REQUEST)) {
#$old_error_handler = set_error_handler("myErrorHandler");
$cli = array();
$locindex = 0;
if (array_key_exists('locindex', $_REQUEST)) {
$locindex = $_REQUEST['locindex'];
}
SimpleSAML_Logger::setCaptureLog();
$orgconfig = SimpleSAML_Configuration::loadFromArray($orgs[$_REQUEST['orgtest']], 'org:[' . $_REQUEST['orgtest'] . ']');
$orgloc = $orgs[$_REQUEST['orgtest']]['locations'][$locindex];
$orgloc = mergeWithTemplate($orgloc, $locationTemplate);
$classname = SimpleSAML_Module::resolveClass($orgloc['testType'], 'Auth_Backend_Test');
$tester = new $classname(SimpleSAML_Configuration::loadFromArray($orgloc, 'Location@[' . $_REQUEST['orgtest'] . ']'), $orgconfig);
$res = $tester->test();
// Machine readable output
if (array_key_exists('output', $_REQUEST) && $_REQUEST['output'] === 'text') {
$ignores = array();
if (array_key_exists('ignore', $_REQUEST)) {
$ignores = explode(',', $_REQUEST['ignore']);
}
$ok = TRUE;
foreach ($res as $tag => $resEntry) {
if (in_array($tag, $ignores)) {
示例2: array
<?php
$config = SimpleSAML_Configuration::getInstance();
$mconfig = SimpleSAML_Configuration::getOptionalConfig('config-metarefresh.php');
SimpleSAML\Utils\Auth::requireAdmin();
SimpleSAML_Logger::setCaptureLog(TRUE);
$sets = $mconfig->getConfigList('sets', array());
foreach ($sets as $setkey => $set) {
SimpleSAML_Logger::info('[metarefresh]: Executing set [' . $setkey . ']');
try {
$expireAfter = $set->getInteger('expireAfter', NULL);
if ($expireAfter !== NULL) {
$expire = time() + $expireAfter;
} else {
$expire = NULL;
}
$metaloader = new sspmod_metarefresh_MetaLoader($expire);
# Get global black/whitelists
$blacklist = $mconfig->getArray('blacklist', array());
$whitelist = $mconfig->getArray('whitelist', array());
// get global type filters
$available_types = array('saml20-idp-remote', 'saml20-sp-remote', 'shib13-idp-remote', 'shib13-sp-remote', 'attributeauthority-remote');
$set_types = $set->getArrayize('types', $available_types);
foreach ($set->getArray('sources') as $source) {
// filter metadata by type of entity
if (isset($source['types'])) {
$metaloader->setTypes($source['types']);
} else {
$metaloader->setTypes($set_types);
}
# Merge global and src specific blacklists