Definition at line 8 of file ScopeAttribute.php.
◆ __construct()
sspmod_core_Auth_Process_ScopeAttribute::__construct |
( |
|
$config, |
|
|
|
$reserved |
|
) |
| |
Initialize this filter, parse configuration.
- Parameters
-
array | $config | Configuration information about this filter. |
mixed | $reserved | For future use. |
Definition at line 47 of file ScopeAttribute.php.
References $config, and SimpleSAML_Configuration\loadFromArray().
48 parent::__construct(
$config, $reserved);
49 assert(
'is_array($config)');
53 $this->scopeAttribute =
$config->getString(
'scopeAttribute');
54 $this->sourceAttribute =
$config->getString(
'sourceAttribute');
55 $this->targetAttribute =
$config->getString(
'targetAttribute');
56 $this->onlyIfEmpty =
$config->getBoolean(
'onlyIfEmpty',
false);
static loadFromArray($config, $location='[ARRAY]', $instance=null)
Loads a configuration from the given array.
◆ process()
sspmod_core_Auth_Process_ScopeAttribute::process |
( |
& |
$request | ) |
|
Apply this filter to the request.
- Parameters
-
array | &$request | The current request |
Definition at line 65 of file ScopeAttribute.php.
References $attributes, $targetAttribute, and array.
66 assert(
'is_array($request)');
67 assert(
'array_key_exists("Attributes", $request)');
83 if ($this->onlyIfEmpty and count(
$attributes[$this->targetAttribute]) > 0) {
87 foreach (
$attributes[$this->scopeAttribute] as $scope) {
89 if (strpos($scope,
'@') !== FALSE) {
90 $scope = explode(
'@', $scope, 2);
94 foreach (
$attributes[$this->sourceAttribute] as $value) {
95 $value = $value .
'@' . $scope;
97 if (in_array($value,
$attributes[$this->targetAttribute], TRUE)) {
Create styles array
The data for the language used.
◆ $onlyIfEmpty
sspmod_core_Auth_Process_ScopeAttribute::$onlyIfEmpty = false |
|
private |
◆ $scopeAttribute
sspmod_core_Auth_Process_ScopeAttribute::$scopeAttribute |
|
private |
◆ $sourceAttribute
sspmod_core_Auth_Process_ScopeAttribute::$sourceAttribute |
|
private |
◆ $targetAttribute
sspmod_core_Auth_Process_ScopeAttribute::$targetAttribute |
|
private |
The documentation for this class was generated from the following file:
- libs/composer/vendor/simplesamlphp/simplesamlphp/modules/core/lib/Auth/Process/ScopeAttribute.php