【发布时间】:2023-03-14 04:18:02
【问题描述】:
假设我将它与我的 API 类一起使用
class EventInfo {
/// @var int $start The Start time
public $start
/// @var string $url The URL for the event {@required false}
public $url = null;
}
现在我想将EventInfo 用于我的 POST 和 PATCH 方法。当我进行 POST 时,$start 是需要设置的属性。 $url 将作为可选参数出现。
但是,当我执行 PATCH 操作时,应该不再需要 $start。我可能会过了一个新的开始时间,但我可能不会。
如何指定?
【问题讨论】:
标签: restler