ILIAS
release_9 Revision v9.13-25-g2c18ec4c24f
◀ ilDoc Overview
ArrayInputData.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\UI\Implementation\Component\Input
;
22
23
use
LogicException
;
24
28
class
ArrayInputData
implements
InputData
29
{
30
protected
array
$data
;
31
32
public
function
__construct
(array $data)
33
{
34
$this->data =
$data
;
35
}
36
37
public
function
get
($name)
38
{
39
if
(!$this->
has
($name)) {
40
throw
new
LogicException
(
"'$name' is not contained in provided data."
);
41
}
42
43
return
$this->data[$name];
44
}
45
46
public
function
getOr
($name, $default)
47
{
48
return
$this->data[$name] ?? $default;
49
}
50
51
public
function
has
($name): bool
52
{
53
return
array_key_exists($name, $this->data);
54
}
55
}
LogicException
ILIAS\UI\Implementation\Component\Input\ArrayInputData
Definition:
ArrayInputData.php:28
ILIAS\UI\Implementation\Component\Input\ArrayInputData\has
has($name)
Definition:
ArrayInputData.php:51
ILIAS\UI\Implementation\Component\Input\InputData
Describes how Input-Elements want to interact with posted data.
Definition:
InputData.php:29
ILIAS\UI\Implementation\Component\Input\ArrayInputData\$data
array $data
Definition:
ArrayInputData.php:30
ILIAS\UI\Implementation\Component\Input\ArrayInputData\getOr
getOr($name, $default)
Definition:
ArrayInputData.php:46
ILIAS\UI\Implementation\Component\Input\ArrayInputData\__construct
__construct(array $data)
Definition:
ArrayInputData.php:32
ILIAS\UI\Implementation\Component\Input
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
ArrayInputData.php:21
src
UI
Implementation
Component
Input
ArrayInputData.php
Generated on Wed Sep 10 2025 14:12:11 for ILIAS by
1.8.13 (using
Doxyfile
)