ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
IsExecutableTransformation.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS\Refinery;
22
24
29{
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}
Validates that the given string is a valid and executable file path.
accepts($value)
Tells if the provided value complies.
trait DeriveTransformWithProblem
This trait is a convenience trait which uses DeriveApplyToFromTransform, DeriveInvokeFromTransform an...
A constraint encodes some resrtictions on values.
Definition: Constraint.php:32
global $lng
Definition: privfeed.php:31