ILIAS
trunk Revision v11.0_alpha-2638-g80c1d007f79
◀ ilDoc Overview
HelpScreenId.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\Services\Help\ScreenId
;
22
28
#[\Attribute(\Attribute::TARGET_CLASS)]
29
class
HelpScreenId
30
{
31
public
function
__construct
(
private
string
$screen_id)
32
{
33
// $screen id can only constist of lowercase letters and underscores. Otherwise, a InvalidArgumentException is thrown.
34
if
(!preg_match(
'/^[a-z0-9_]+$/'
, $screen_id)) {
35
throw
new \InvalidArgumentException(
'Screen name must only consist of lowercase letters, numbers and underscores.'
);
36
}
37
}
38
39
public
function
getScreenId
(): string
40
{
41
return
$this->screen_id;
42
}
43
}
ILIAS\Services\Help\ScreenId\HelpScreenId
Definition:
HelpScreenId.php:29
ILIAS\Services\Help\ScreenId\HelpScreenId\getScreenId
getScreenId()
Definition:
HelpScreenId.php:39
ILIAS\Services\Help\ScreenId
Definition:
ClassNameToScreenId.php:21
ILIAS\Services\Help\ScreenId\HelpScreenId\__construct
__construct(private string $screen_id)
Definition:
HelpScreenId.php:31
components
ILIAS
Help
ScreenId
HelpScreenId.php
Generated on Sun Aug 31 2025 23:03:06 for ILIAS by
1.8.13 (using
Doxyfile
)