PHP Classes

File: web/SSO/modules/modinfo/www/index.php

Recommend this page to a friend!
  Classes of william amed   Raptor 2   web/SSO/modules/modinfo/www/index.php   Download  
File: web/SSO/modules/modinfo/www/index.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Raptor 2
Framework that takes routes from annotations
Author: By
Last change:
Date: 8 years ago
Size: 667 bytes
 

Contents

Class file image Download
<?php

$modules
= SimpleSAML_Module::getModules();
sort($modules);

$modinfo = array();

foreach(
$modules as $m) {
   
$modinfo[$m] = array(
       
'enabled' => SimpleSAML_Module::isModuleEnabled($m),
    );
    if (
sspmod_core_ModuleDefinition::isDefined($m)) {
       
$modinfo[$m]['def'] = sspmod_core_ModuleDefinition::load($m);
    }

}

function
cmpa($a, $b) {
   
    if (isset(
$a['def']) && !isset($b['def'])) return -1;
    if (isset(
$b['def']) && !isset($a['def'])) return 1;
    return
0;
}
uasort($modinfo, 'cmpa');

$config = SimpleSAML_Configuration::getInstance();
$t = new SimpleSAML_XHTML_Template($config, 'modinfo:modlist.php');
$t->data['modules'] = $modinfo;
$t->show();

?>