PHP » GoLang |
login |
register |
about
|
GoLang MongoDB\Driver\Cursor::setTypeMap
request it (342)
GoLang replacement for PHP's MongoDB\Driver\Cursor::setTypeMap
[edit | history]
PHP MongoDB\Driver\Cursor::setTypeMapPHP original manual for MongoDB\Driver\Cursor::setTypeMap [ show | php.net ]MongoDB\Driver\Cursor::setTypeMap(mongodb >=1.0.0) MongoDB\Driver\Cursor::setTypeMap — Sets a type map to use for BSON unserialization Description
final public void MongoDB\Driver\Cursor::setTypeMap
( array
$typemap
)Sets the type map configuration to use when unserializing the BSON results into PHP values. Parameters
Return ValuesNo value is returned. Errors/Exceptions
When iterating over the cursor, the following exceptions can also be thrown due to an incorrect type map configuration:
ExamplesExample #1 MongoDB\Driver\Cursor::setTypeMap() example
<?php The above example will output something similar to: array(2) { ["_id"]=> object(MongoDB\BSON\ObjectId)#6 (1) { ["oid"]=> string(24) "56424fb76118fd3267180741" } ["x"]=> int(1) } See Also |
more
Recently updated
more
Most requested
more
Last requests
|