PHPマニュアル/PEARマニュアル | ユーザフォーラムで議論/質問 | マニュアル検索 | ハイライト | ハイライトオフ | ポータル | php spot

MongoDB\Driver\Server::getInfo - Returns an array of information about this server | JavaScript入門&応用&リファレンスなら「JavaScriptist」

  

MongoDB\Driver\Server::getInfo

(mongodb >=1.0.0)

MongoDB\Driver\Server::getInfoReturns an array of information about this server

説明

final public array MongoDB\Driver\Server::getInfo ( void )

Returns an array of information about this server.

パラメータ

この関数にはパラメータはありません。

返り値

Returns an array of information about this server.

エラー / 例外

例1 MongoDB\Driver\Server::getInfo() example

<?php

$manager 
= new MongoDB\Driver\Manager("mongodb://localhost:27017/");

$rp = new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_PRIMARY);
$server $manager->selectServer($rp);

var_dump($server->getInfo());

?>

上の例の出力は、 たとえば以下のようになります。

array(8) {
  ["ismaster"]=>
  bool(true)
  ["maxBsonObjectSize"]=>
  int(16777216)
  ["maxMessageSizeBytes"]=>
  int(48000000)
  ["maxWriteBatchSize"]=>
  int(1000)
  ["localTime"]=>
  object(MongoDB\BSON\UTCDateTime)#4 (1) {
    ["milliseconds"]=>
    int(1447276242774)
  }
  ["maxWireVersion"]=>
  int(3)
  ["minWireVersion"]=>
  int(0)
  ["ok"]=>
  float(1)
}

忘却曲線を使ってこの知識を確実に記憶に残す

フォーラムで「MongoDB\Driver\Server::getInfo - Returns an array of information about this server」について話す
各種マニュアル: PHPマニュアル | PEARマニュアル | Smarty(英語)マニュアル | PHP-GTKマニュアル | MongoDB\Driver\Server::getInfo - Returns an array of information about this server」をGoogle検索
copyright © 1997-2024 PHP ドキュメント作成グループ(ライセンス). provided by php spot. マニュアル: