ILIAS  trunk Revision v11.0_alpha-1769-g99a433fe2dc
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
StringTransformation.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 namespace ILIAS\Refinery\URI;
22 
23 use ILIAS\Data\URI;
28 
30 {
33 
37  public function transform($from): string
38  {
39  if (false === $from instanceof URI) {
41  sprintf('The value MUST be of type "%s"', URI::class),
42  'not_uri_object'
43  );
44  }
45 
46  return $from->__toString();
47  }
48 }
A transformation is a function from one datatype to another.