ILIAS  release_8 Revision v8.24
HasMinLength.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
21namespace ILIAS\Refinery\String;
22
23use ILIAS\Data;
25use ilLanguage;
26
28{
29 public function __construct(int $min_length, Data\Factory $data_factory, ilLanguage $lng)
30 {
32 static function ($value) use ($min_length): bool {
33 return strlen($value) >= $min_length;
34 },
35 static function ($txt, $value) use ($min_length): string {
36 $len = strlen($value);
37 return $txt("not_min_length", $len, $min_length);
38 },
39 $data_factory,
40 $lng
41 );
42 }
43}
Builds data types.
Definition: Factory.php:21
__construct(int $min_length, Data\Factory $data_factory, ilLanguage $lng)
language handling
$txt
Definition: error.php:13
A constraint encodes some resrtictions on values.
Definition: Constraint.php:32
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: CaseOfLabel.php:21
$lng