commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
DateTimeFieldBuilder.php
1 <?php
2 
3 declare(strict_types=1);
10 
16 use DateTimeImmutable;
17 use stdClass;
18 
22 final class DateTimeFieldBuilder implements Builder
23 {
28  private $value;
29 
34  public function getValue()
35  {
36  return $this->value;
37  }
38 
43  public function withValue(?DateTimeImmutable $value)
44  {
45  $this->value = $value;
46 
47  return $this;
48  }
49 
50 
51  public function build(): DateTimeField
52  {
53  return new DateTimeFieldModel(
54  $this->value
55  );
56  }
57 
58  public static function of(): DateTimeFieldBuilder
59  {
60  return new self();
61  }
62 }