« MongoDB\BSON\Document::fromJSON
MongoDB\BSON\Document::get »

MongoDB\BSON\Document::fromPHP

(mongodb >=1.16.0)

MongoDB\BSON\Document::fromPHP — Construct a new document instance from PHP data

説明

final static public function MongoDB\BSON\Document::fromPHP(object|array $value): MongoDB\BSON\Document

パラメータ

value (object|array)

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.

エラー / 例外

参考

関連キーワード:
MongoDB   Document   document   instance   Construct   fromPHP   fromJSON   numeric   keys   mongodb   final   static   containing   passing   values   converted   strings   used   Throws   Driver   Exception   InvalidArgumentException   argument   parsing   errors
関連する関数・ページ:
mongodb-bson-document.fromjson   mongodb-bson-document.frombson   mongodb-bson-document.construct   mongodb-bson-document.get   class.mongodb-bson-document   mongodb-bson-document.offsetget