ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
sspmod_metarefresh_ARP Class Reference
+ Collaboration diagram for sspmod_metarefresh_ARP:

Public Member Functions

 __construct ($metadata, $attributemap, $prefix, $suffix)
 Constructor. More...
 
 getXML ()
 

Private Member Functions

 loadAttributeMap ($attributemap)
 
 surround ($name)
 
 getAttributeID ($name)
 
 getEntryXML ($entry)
 
 getEntryXMLcontent ($entry)
 

Private Attributes

 $metadata
 
 $attributes
 
 $prefix
 
 $suffix
 

Detailed Description

Definition at line 6 of file ARP.php.

Constructor & Destructor Documentation

◆ __construct()

sspmod_metarefresh_ARP::__construct (   $metadata,
  $attributemap,
  $prefix,
  $suffix 
)

Constructor.

Parameters

Definition at line 19 of file ARP.php.

19 {
20 $this->metadata = $metadata;
21
22 $this->prefix = $prefix;
23 $this->suffix = $suffix;
24
26 }
$attributemap
Definition: addurnprefix.php:3
loadAttributeMap($attributemap)
Definition: ARP.php:28

References $attributemap, $metadata, $prefix, $suffix, and loadAttributeMap().

+ Here is the call graph for this function:

Member Function Documentation

◆ getAttributeID()

sspmod_metarefresh_ARP::getAttributeID (   $name)
private

Definition at line 42 of file ARP.php.

42 {
43 if (empty($this->attributes)) {
44 return $this->surround($name);
45 }
46 if (array_key_exists($name, $this->attributes)) {
47 return $this->surround($this->attributes[$name]);
48 }
49 return $this->surround($name);
50 }
if($format !==null) $name
Definition: metadata.php:146

References $name, and surround().

Referenced by getEntryXMLcontent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getEntryXML()

sspmod_metarefresh_ARP::getEntryXML (   $entry)
private

Definition at line 72 of file ARP.php.

72 {
73 $entityid = $entry['entityid'];
74 return ' <AttributeFilterPolicy id="' . $entityid . '">
75 <PolicyRequirementRule xsi:type="basic:AttributeRequesterString" value="' . $entityid . '" />
76' . $this->getEntryXMLcontent($entry) . '
77 </AttributeFilterPolicy>
78';
79 }
getEntryXMLcontent($entry)
Definition: ARP.php:81

References getEntryXMLcontent().

Referenced by getXML().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getEntryXMLcontent()

sspmod_metarefresh_ARP::getEntryXMLcontent (   $entry)
private

Definition at line 81 of file ARP.php.

81 {
82 $ids = array();
83 if (!array_key_exists('attributes', $entry))
84 return '';
85
86 $ret = '';
87 foreach($entry['attributes'] AS $a) {
88
89 $ret .= ' <AttributeRule attributeID="' . $this->getAttributeID($a) . '">
90 <PermitValueRule xsi:type="basic:ANY" />
91 </AttributeRule>
92';
93
94 }
95 return $ret;
96 }
getAttributeID($name)
Definition: ARP.php:42
$ret
Definition: parser.php:6

References $ret, and getAttributeID().

Referenced by getEntryXML().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getXML()

sspmod_metarefresh_ARP::getXML ( )

Definition at line 52 of file ARP.php.

52 {
53
54 $xml = '<?xml version="1.0" encoding="UTF-8"?>
55<AttributeFilterPolicyGroup id="urn:mace:funet.fi:haka:kalmar" xmlns="urn:mace:shibboleth:2.0:afp"
56 xmlns:basic="urn:mace:shibboleth:2.0:afp:mf:basic" xmlns:saml="urn:mace:shibboleth:2.0:afp:mf:saml"
57 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
58 xsi:schemaLocation="urn:mace:shibboleth:2.0:afp classpath:/schema/shibboleth-2.0-afp.xsd
59 urn:mace:shibboleth:2.0:afp:mf:basic classpath:/schema/shibboleth-2.0-afp-mf-basic.xsd
60 urn:mace:shibboleth:2.0:afp:mf:saml classpath:/schema/shibboleth-2.0-afp-mf-saml.xsd">
61';
62
63
64 foreach($this->metadata AS $metadata) {
65 $xml .= $this->getEntryXML($metadata['metadata']);
66 }
67
68 $xml .= '</AttributeFilterPolicyGroup>';
69 return $xml;
70 }
getEntryXML($entry)
Definition: ARP.php:72
$xml
Definition: metadata.php:240

References $metadata, $xml, and getEntryXML().

+ Here is the call graph for this function:

◆ loadAttributeMap()

sspmod_metarefresh_ARP::loadAttributeMap (   $attributemap)
private

Definition at line 28 of file ARP.php.

28 {
30 include($config->getPathValue('attributemap', 'attributemap/') . $attributemap . '.php');
31 $this->attributes = $attributemap;
32 }
static getInstance($instancename='simplesaml')
Get a configuration file by its instance name.

References $attributemap, $config, and SimpleSAML_Configuration\getInstance().

Referenced by __construct().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ surround()

sspmod_metarefresh_ARP::surround (   $name)
private

Definition at line 34 of file ARP.php.

34 {
35 $ret = '';
36 if (!empty($this->prefix)) $ret .= $this->prefix;
37 $ret .= $name;
38 if (!empty($this->suffix)) $ret .= $this->suffix;
39 return $ret;
40 }

References $name, $prefix, $ret, and $suffix.

Referenced by getAttributeID().

+ Here is the caller graph for this function:

Field Documentation

◆ $attributes

sspmod_metarefresh_ARP::$attributes
private

Definition at line 10 of file ARP.php.

◆ $metadata

sspmod_metarefresh_ARP::$metadata
private

Definition at line 9 of file ARP.php.

Referenced by __construct(), and getXML().

◆ $prefix

sspmod_metarefresh_ARP::$prefix
private

Definition at line 11 of file ARP.php.

Referenced by __construct(), and surround().

◆ $suffix

sspmod_metarefresh_ARP::$suffix
private

Definition at line 12 of file ARP.php.

Referenced by __construct(), and surround().


The documentation for this class was generated from the following file: