|
MongoDB\Driver\Cursor::setTypeMapSets a type map to use for BSON unserialization 説明
final public void MongoDB\Driver\Cursor::setTypeMap(array
$typemap)Sets the type map configuration to use when unserializing the BSON results into PHP values. パラメータ
戻り値値を返しません。 エラー / 例外
When iterating over the cursor, the following exceptions can also be thrown due to an incorrect type map configuration:
例例1 MongoDB\Driver\Cursor::setTypeMap example 上の例の出力は、 たとえば以下のようになります。
array(2) {
["_id"]=>
object(MongoDB\BSON\ObjectId)#6 (1) {
["oid"]=>
string(24) "56424fb76118fd3267180741"
}
["x"]=>
int(1)
}
|