ILIAS  trunk Revision v11.0_alpha-1723-g8e69f309bab
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
Convert.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
24 
25 class Convert
26 {
27  public function __construct(
28  private readonly Transformation $from_string,
29  private readonly Transformation $to_string
30  ) {
31  }
32 
33  public function fromString(): Transformation
34  {
35  return $this->from_string;
36  }
37 
38  public function toString(): Transformation
39  {
40  return $this->to_string;
41  }
42 }
__construct(private readonly Transformation $from_string, private readonly Transformation $to_string)
Definition: Convert.php:27
A transformation is a function from one datatype to another.