The MongoDB\BSON\UTCDateTimeInterface interface
(mongodb >=1.3.0)
简介
This interface is implemented by MongoDB\BSON\UTCDateTime to be used as a parameter, return, or property type in userland classes.
类摘要
class MongoDB\BSON\UTCDateTimeInterface
{
/* 方法 */
}更新日志
| 版本 | 说明 |
|---|---|
| PECL mongodb 2.0.0 | 之前声明为暂定的返回类型现在已被强制执行。 |
| PECL mongodb 1.15.0 |
在 PHP 8.0 及更高版本中,方法的返回类型被声明为暂定(tentative),
这会导致在实现该接口但未声明相应返回类型的代码中触发弃用提示。
可以添加 #[ReturnTypeWillChange] 属性来消除该弃用提示。
|
目录
- MongoDB\BSON\UTCDateTimeInterface::toDateTime — Returns the DateTime representation of this UTCDateTimeInterface
- MongoDB\BSON\UTCDateTimeInterface::toDateTimeImmutable — Returns the DateTimeImmutable representation of this UTCDateTimeInterface
- MongoDB\BSON\UTCDateTimeInterface::__toString — Returns the string representation of this UTCDateTimeInterface