PHP » GoLang |
login |
register |
about
|
GoLang MongoDB\Driver\ReadPreference::__construct
request it (415)
GoLang replacement for PHP's MongoDB\Driver\ReadPreference::__construct
[edit | history]
PHP MongoDB\Driver\ReadPreference::__constructPHP original manual for MongoDB\Driver\ReadPreference::__construct [ show | php.net ]MongoDB\Driver\ReadPreference::__construct(mongodb >=1.0.0) MongoDB\Driver\ReadPreference::__construct — Create a new ReadPreference Description
final public MongoDB\Driver\ReadPreference::__construct
( string|integer
$mode
[, array $tagSets = NULL
[, array $options = array()
]] )Constructs a new MongoDB\Driver\ReadPreference, which is an immutable value object. Parameters
Errors/Exceptions
Changelog
ExamplesExample #1 MongoDB\Driver\ReadPreference::__construct() example
<?php The above example will output: object(MongoDB\Driver\ReadPreference)#1 (1) { ["mode"]=> string(18) "secondaryPreferred" } object(MongoDB\Driver\ReadPreference)#1 (2) { ["mode"]=> string(7) "nearest" ["tags"]=> array(1) { [0]=> object(stdClass)#2 (1) { ["dc"]=> string(2) "ny" } } } object(MongoDB\Driver\ReadPreference)#1 (2) { ["mode"]=> string(9) "secondary" ["maxStalenessSeconds"]=> int(120) } See Also |
more
Recently updated
more
Most requested
more
Last requests
|