ILIAS
trunk Revision v11.0_alpha-2645-g16283d3b3f8
◀ ilDoc Overview
GetProbe.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\Component\Dependencies
;
22
23
use
ILIAS\Component\Component
;
24
25
class
GetProbe
implements
\ArrayAccess
26
{
27
public
function
__construct
(
28
protected
$probe
29
) {
30
if
(!is_callable($probe)) {
31
throw
new \InvalidArgumentException(
32
"Expected \$probe to be callable."
33
);
34
}
35
}
36
37
public
function
offsetExists
($offset): bool
38
{
39
return
false
;
40
}
41
42
public
function
offsetGet
($offset): mixed
43
{
44
$probe = $this->probe;
45
return
$probe($offset);
46
}
47
48
public
function
offsetSet
($offset, $value): void
49
{
50
throw
new \LogicException(
51
"Read-only dependency type used for writing."
52
);
53
}
54
55
public
function
offsetUnset
($offset): void
56
{
57
}
58
}
ILIAS\Component\Dependencies\GetProbe\__construct
__construct(protected $probe)
Definition:
GetProbe.php:27
ILIAS\Component\Dependencies\GetProbe\offsetUnset
offsetUnset($offset)
Definition:
GetProbe.php:55
ILIAS\Component\Dependencies\GetProbe
Definition:
GetProbe.php:25
ILIAS\Component\Dependencies\GetProbe\offsetGet
offsetGet($offset)
Definition:
GetProbe.php:42
ILIAS\Component\Dependencies\GetProbe\offsetSet
offsetSet($offset, $value)
Definition:
GetProbe.php:48
ILIAS\Component\Dependencies\GetProbe\offsetExists
offsetExists($offset)
Definition:
GetProbe.php:37
Component
ILIAS\Component\Dependencies
Definition:
Define.php:21
components
ILIAS
Component
src
Dependencies
GetProbe.php
Generated on Mon Sep 1 2025 23:02:39 for ILIAS by
1.8.13 (using
Doxyfile
)