PHP Classes

File: web/SSO/modules/aggregator/bin/get.php

Recommend this page to a friend!
  Classes of william amed   Raptor 2   web/SSO/modules/aggregator/bin/get.php   Download  
File: web/SSO/modules/aggregator/bin/get.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: 640 bytes
 

Contents

Class file image Download
#!/usr/bin/env php
<?php

require_once(dirname(dirname(dirname(dirname(__FILE__)))) . '/lib/_autoload.php');

if (
$argc < 2) {
   
fwrite(STDERR, "Missing aggregator id.\n");
    exit(
1);
}
$id = $argv[1];

$gConfig = SimpleSAML_Configuration::getConfig('module_aggregator.php');
$aggregators = $gConfig->getConfigItem('aggregators');

$aConfig = $aggregators->getConfigItem($id, NULL);
if (
$aConfig === NULL) {
   
fwrite(STDERR, 'No aggregator with id ' . var_export($id, TRUE) . " found.\n");
    exit(
1);
}

$aggregator = new sspmod_aggregator_Aggregator($gConfig, $aConfig, $id);

$xml = $aggregator->getMetadataDocument();
echo(
$xml->saveXML());