ILIAS  trunk Revision v11.0_alpha-1866-gfa368f7776e
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
Builder.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=0);
20 
22 
26 
27 class Builder implements BuilderInterface
28 {
29  protected array $properties;
30 
31  public function __construct()
32  {
33  $this->properties = [];
34  }
35 
36  public function withProperty(
37  string $key,
38  string $value
39  ): BuilderInterface {
40  $clone = clone $this;
41  $clone->properties[$key] = $value;
42  return $clone;
43  }
44 
45  public function getList(): PropertyListInterface
46  {
47  return new PropertyList($this->properties);
48  }
49 }
withProperty(string $key, string $value)
Definition: Builder.php:36