ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
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 
29 class StringTransformation implements Transformation
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 }
The scope of this class is split ilias-conform URI&#39;s into components.
Definition: URI.php:34