✏️ 编辑:TimeRangeBuilder.php
路径:
/home/forge/woocommerce-square/vendor/square/square/src/Models/Builders/TimeRangeBuilder.php
大小:1.41 KB · 修改:2025-12-23 20:26:26 · 权限:0644 · 可写
← 返回目录
👁 查看
⬇ 下载
<?php declare(strict_types=1); namespace Square\Models\Builders; use Core\Utils\CoreHelper; use Square\Models\TimeRange; /** * Builder for model TimeRange * * @see TimeRange */ class TimeRangeBuilder { /** * @var TimeRange */ private $instance; private function __construct(TimeRange $instance) { $this->instance = $instance; } /** * Initializes a new Time Range Builder object. */ public static function init(): self { return new self(new TimeRange()); } /** * Sets start at field. * * @param string|null $value */ public function startAt(?string $value): self { $this->instance->setStartAt($value); return $this; } /** * Unsets start at field. */ public function unsetStartAt(): self { $this->instance->unsetStartAt(); return $this; } /** * Sets end at field. * * @param string|null $value */ public function endAt(?string $value): self { $this->instance->setEndAt($value); return $this; } /** * Unsets end at field. */ public function unsetEndAt(): self { $this->instance->unsetEndAt(); return $this; } /** * Initializes a new Time Range object. */ public function build(): TimeRange { return CoreHelper::clone($this->instance); } }
💾 保存
取消
保存为 UTF-8,换行统一为 LF