◆ __construct()
◆ getAttributeKey()
ilSamlMappedUserAttributeValueParser::getAttributeKey |
( |
| ) |
|
Definition at line 48 of file class.ilSamlMappedUserAttributeValueParser.php.
Referenced by parse().
53 preg_match(self::ATTR_REGEX, $this->rule->getExternalAttribute(), $matches);
55 if (is_array($matches) && isset($matches[1]) && is_string($matches[1])) {
56 $attribute = $matches[1];
◆ getValueIndex()
ilSamlMappedUserAttributeValueParser::getValueIndex |
( |
| ) |
|
|
private |
◆ parse()
ilSamlMappedUserAttributeValueParser::parse |
( |
| ) |
|
Definition at line 62 of file class.ilSamlMappedUserAttributeValueParser.php.
References getAttributeKey(), and getValueIndex().
66 if (!array_key_exists($attributeKey, $this->userData)) {
68 "Configured external attribute of mapping '%s' -> '%s' does not exist in SAML attribute data.",
69 $this->rule->getAttribute(),
70 $this->rule->getExternalAttribute()
74 $value = $this->userData[$attributeKey];
76 if (is_array($value)) {
79 if (!array_key_exists($valueIndex, $value)) {
81 "Configured external attribute of mapping '%s' -> '%s' does not exist in SAML attribute data.",
82 $this->rule->getAttribute(),
83 $this->rule->getExternalAttribute()
87 $value = $value[$valueIndex];
90 if (!is_scalar($value)) {
92 "Could not parse a scalar value based on the user attribute mapping '%s' -> '%s'.",
93 $this->rule->getAttribute(),
94 $this->rule->getExternalAttribute()
98 return (
string) $value;
◆ ATTR_REGEX
const string ilSamlMappedUserAttributeValueParser::ATTR_REGEX = '/^(.*?)(\|(\d+))?$/' |
|
private |
The documentation for this class was generated from the following file: