Deprecated: Optional parameter $keys declared before required parameter $cms_id is implicitly treated as a required parameter in /home/www/dev/work/class/blog/CmsKey.php on line 75

Deprecated: Creation of dynamic property lvesu\lvesu\controller\blog\php::$title is deprecated in /home/www/dev/work/website/lvesu/class/controller/blog/php.php on line 28

Deprecated: Creation of dynamic property lvesu\lvesu\controller\blog\php::$outlink is deprecated in /home/www/dev/work/website/lvesu/template/blog/cms/php.manual.tpl on line 2

Deprecated: Creation of dynamic property lvesu\lvesu\controller\blog\php::$status is deprecated in /home/www/dev/work/website/lvesu/template/blog/index.head.php on line 2
PHP - Manual: MongoId::__set_state - 互联网笔记

略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: MongoId::__set_state

2025-05-20

MongoId::__set_state

(PECL mongo >= 1.0.8)

MongoId::__set_state创建一个假的 MongoId

说明

public static MongoId::__set_state ( array $props ) : MongoId

该函数仅被 PHP 内部使用,用户不需要调用它。

它和下面的函数是一样的:

<?php

public static function __set_state($props) {
    return new 
MongoId("000000000000000000000000");
}

?>

参数

props

从理论上讲,要用数组的属性来创建一个新 id。但是 MongoId 示例没有属性,所以这是没用的。

返回值

具有 "000000000000000000000000" 的值的 id。

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.

官方地址:https://www.php.net/manual/en/mongoid.set-state.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3