ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
BooleanTransformation.php
Go to the documentation of this file.
1 <?php
2 declare(strict_types=1);
3 
4 /* Copyright (c) 1998-2019 ILIAS open source, Extended GPL, see docs/LICENSE */
5 
11 
17 
19 {
22 
26  public function transform($from)
27  {
28  if (false === is_bool($from)) {
30  'The value MUST be of type boolean',
31  'not_boolean'
32  );
33  }
34  return (bool) $from;
35  }
36 }
transform($from)
Perform the transformation.Please use this for transformations. It&#39;s more performant than calling inv...
A transformation is a function from one datatype to another.