ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
SAML2\Configuration\ArrayAdapter Class Reference

Default implementation for configuration. More...

+ Inheritance diagram for SAML2\Configuration\ArrayAdapter:
+ Collaboration diagram for SAML2\Configuration\ArrayAdapter:

Public Member Functions

 __construct (array $configuration)
 
 get ($key, $defaultValue=null)
 Query to get the value in the configuration for the given key. More...
 
 has ($key)
 Query for whether or not the configuration has a value for the key. More...
 

Private Attributes

 $configuration
 

Detailed Description

Default implementation for configuration.

Definition at line 8 of file ArrayAdapter.php.

Constructor & Destructor Documentation

◆ __construct()

SAML2\Configuration\ArrayAdapter::__construct ( array  $configuration)
Parameters
array$configuration

Definition at line 18 of file ArrayAdapter.php.

References SAML2\Configuration\ArrayAdapter\$configuration.

19  {
20  $this->configuration = $configuration;
21  }

Member Function Documentation

◆ get()

SAML2\Configuration\ArrayAdapter::get (   $key,
  $default = null 
)

Query to get the value in the configuration for the given key.

If no value is present the default value is returned

Parameters
string$key
null | mixed$default
Returns
mixed

Implements SAML2\Configuration\Queryable.

Definition at line 23 of file ArrayAdapter.php.

References $key, and SAML2\Configuration\ArrayAdapter\has().

24  {
25  if (!$this->has($key)) {
26  return $defaultValue;
27  }
28 
29  return $this->configuration[$key];
30  }
has($key)
Query for whether or not the configuration has a value for the key.
$key
Definition: croninfo.php:18
+ Here is the call graph for this function:

◆ has()

SAML2\Configuration\ArrayAdapter::has (   $key)

Query for whether or not the configuration has a value for the key.

Parameters
string$key
Returns
bool

Implements SAML2\Configuration\Queryable.

Definition at line 32 of file ArrayAdapter.php.

References $key.

Referenced by SAML2\Configuration\ArrayAdapter\get().

33  {
34  return array_key_exists($key, $this->configuration);
35  }
$key
Definition: croninfo.php:18
+ Here is the caller graph for this function:

Field Documentation

◆ $configuration

SAML2\Configuration\ArrayAdapter::$configuration
private

Definition at line 13 of file ArrayAdapter.php.

Referenced by SAML2\Configuration\ArrayAdapter\__construct().


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