MongoDB\BSON\Document::fromBSON

Construct a new document instance from a BSON string

説明

final static public MongoDB\BSON\Document MongoDB\BSON\Document::fromBSON(string $bson)

パラメータ

bson (string)

A string containing a document in BSON format.

エラー / 例外

  • Throws MongoDB\Driver\Exception\InvalidArgumentException on argument parsing errors.
  • Throws MongoDB\Driver\Exception\UnexpectedValueException if bson is an invalid BSON string or contains more than a single document.

参考

  • MongoDB\BSON\Document::fromPHP
  • MongoDB\BSON\Document::fromJSON
  • » BSON Types