ILIAS  release_7 Revision v7.30-3-g800a261c036
IsNull.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 2018 Fabian Schmid <fs@studer-raimann.ch> Extended GPL, see docs/LICENSE */
3
4namespace ILIAS\Refinery;
5
6use ILIAS\Refinery\Custom\Constraint as CustomConstraint;
7use ILIAS\Data;
9
17class IsNull extends CustomConstraint implements Constraint
18{
19
26 {
28 function ($value) {
29 return is_null($value);
30 },
31 function ($txt, $value) {
32 return $txt("not_a_null", gettype($value));
33 },
35 $lng
36 );
37 }
38}
An exception for terminatinating execution or to throw for unit testing.
Builds data types.
Definition: Factory.php:20
__construct(Data\Factory $data_factory, \ilLanguage $lng)
IsNull constructor.
Definition: IsNull.php:25
language handling
$txt
Definition: error.php:13
A constraint encodes some resrtictions on values.
Definition: Constraint.php:15
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc