ILIAS  trunk Revision v11.0_alpha-2645-g16283d3b3f8
class.ilString.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
23 use ILIAS\Export\ImportStatus\I\Content\Builder\ilStringInterface as ilImportStatusStringContentBuilderInterface;
25 
26 class ilString implements ilImportStatusStringContentBuilderInterface
27 {
28  private string $content;
29 
30  public function __construct()
31  {
32  $this->content = '';
33  }
34 
35  public function toString(): string
36  {
37  return $this->content;
38  }
39 
40  public function withString(string $content)
41  {
42  $clone = clone $this;
43  $clone->content = $content;
44  return $clone;
45  }
46 
48  {
49  $clone = clone $this;
50  $clone->content .= $other->toString();
51  return $clone;
52  }
53 }