ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ArrayAdapter.php
Go to the documentation of this file.
1<?php
2
4
8class ArrayAdapter implements Queryable
9{
14
18 public function __construct(array $configuration)
19 {
20 $this->configuration = $configuration;
21 }
22
23 public function get($key, $defaultValue = null)
24 {
25 if (!$this->has($key)) {
26 return $defaultValue;
27 }
28
29 return $this->configuration[$key];
30 }
31
32 public function has($key)
33 {
34 return array_key_exists($key, $this->configuration);
35 }
36}
An exception for terminatinating execution or to throw for unit testing.
Default implementation for configuration.
Definition: ArrayAdapter.php:9
has($key)
Query for whether or not the configuration has a value for the key.
__construct(array $configuration)
$key
Definition: croninfo.php:18
Interface \SAML2\Configuration\Queryable.
Definition: Queryable.php:9