ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Static Public Member Functions | |
static | getExpectedAttribute ($attributes, $expected, $allow_multiple=false) |
Look for an attribute in a normalized attributes array, failing if it's not there. More... | |
static | normalizeAttributesArray ($attributes) |
Validate and normalize an array with attributes. More... | |
static | getAttributeNamespace ($name, $defaultns) |
Extract an attribute's namespace, or revert to default. More... | |
Definition at line 10 of file Attributes.php.
|
static |
Extract an attribute's namespace, or revert to default.
This function takes in a namespaced attribute name and splits it in a namespace/attribute name tuple. When no namespace is found in the attribute name, it will be namespaced with the default namespace. This default namespace can be overriden by supplying a second parameter to this function.
string | $name | The namespaced attribute name. |
string | $defaultns | The default namespace that should be used when no namespace is found. |
Definition at line 122 of file Attributes.php.
References $name.
Referenced by sspmod_adfs_IdP_ADFS\generateResponse().
|
static |
Look for an attribute in a normalized attributes array, failing if it's not there.
array | $attributes | The normalized array containing attributes. |
string | $expected | The name of the attribute we are looking for. |
bool | $allow_multiple | Whether to allow multiple values in the attribute or not. |
InvalidArgumentException If $attributes is not an array or $expected is not a string.
SimpleSAML_Error_Exception If the expected attribute was not found in the attributes array.
Definition at line 26 of file Attributes.php.
References $attributes.
|
static |
Validate and normalize an array with attributes.
This function takes in an associative array with attributes, and parses and validates this array. On success, it will return a normalized array, where each attribute name is an index to an array of one or more strings. On failure an exception will be thrown. This exception will contain an message describing what is wrong.
array | $attributes | The array containing attributes that we should validate and normalize. |
InvalidArgumentException If input is not an array, array keys are not strings or attribute values are not strings.
Definition at line 79 of file Attributes.php.
References $attributes, $name, $values, and SimpleSAML\Utils\Arrays\arrayize().
Referenced by sspmod_authcrypt_Auth_Source_Hash\__construct(), sspmod_authcrypt_Auth_Source_Htpasswd\__construct(), sspmod_exampleauth_Auth_Source_Static\__construct(), sspmod_exampleauth_Auth_Source_UserPass\__construct(), and SimpleSAML_Utilities\parseAttributes().