ILIAS
trunk Revision v11.0_alpha-3011-gc6b235a2e85
◀ ilDoc Overview
IsExecutableTransformation.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\Refinery
;
22
23
use
ILIAS\Language\Language
;
24
28
class
IsExecutableTransformation
implements
Constraint
29
{
30
use
DeriveTransformWithProblem
;
31
33
private
$error
=
'The value MUST specify an executable path.'
;
34
35
public
function
__construct
(
private
readonly
Language
$lng
)
36
{
37
}
38
39
public
function
accepts
($value): bool
40
{
41
return
is_string($value) && is_executable($value);
42
}
43
44
public
function
getError
()
45
{
46
return
$this->error
;
47
}
48
}
ILIAS\Language
Definition:
Language.php:24
ILIAS\Refinery\IsExecutableTransformation
Validates that the given string is a valid and executable file path.
Definition:
IsExecutableTransformation.php:29
ILIAS\Refinery\IsExecutableTransformation\getError
getError()
Definition:
IsExecutableTransformation.php:44
ILIAS\Refinery\IsExecutableTransformation\__construct
__construct(private readonly Language $lng)
Definition:
IsExecutableTransformation.php:35
ILIAS\Refinery\IsExecutableTransformation\$error
$error
Definition:
IsExecutableTransformation.php:33
ILIAS\Refinery\IsExecutableTransformation\accepts
accepts($value)
Tells if the provided value complies.
Definition:
IsExecutableTransformation.php:39
ILIAS\Refinery\DeriveTransformWithProblem
trait DeriveTransformWithProblem
This trait is a convenience trait which uses DeriveApplyToFromTransform, DeriveInvokeFromTransform an...
Definition:
DeriveTransformWithProblem.php:31
ILIAS\Language\Language
Definition:
Language.php:24
ILIAS\Refinery\Constraint
A constraint encodes some resrtictions on values.
Definition:
Constraint.php:32
ILIAS\Refinery
Definition:
ByTrying.php:21
$lng
global $lng
Definition:
privfeed.php:31
components
ILIAS
Refinery
src
IsExecutableTransformation.php
Generated on Sat Oct 18 2025 23:03:34 for ILIAS by
1.9.4 (using
Doxyfile
)