MongoDB\BSON\Document::fromPHP
Construct a new document instance from PHP data
説明
final static public MongoDB\BSON\Document MongoDB\BSON\Document::fromPHP(objectarray $value
)
パラメータ
-
value
(objectarray)
-
A PHP object or array containing the document. When passing an array with
numeric keys, the numeric values are converted to strings and used as
document keys.
戻り値
Returns a new MongoDB\BSON\Document instance.
エラー / 例外
- Throws MongoDB\Driver\Exception\InvalidArgumentException on argument parsing errors.
参考
- MongoDB\BSON\Document::fromBSON
- MongoDB\BSON\Document::fromJSON
- » BSON Types