From a7e22b7fb8fc7cb5c6bda5a71a852378d3b73ad8 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Fri, 6 Apr 2012 10:24:23 +0000 Subject: [PATCH] Added info on non-replicasets with 1.2.10. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@324902 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/mongo/mongo/gethosts.xml | 48 ++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/reference/mongo/mongo/gethosts.xml b/reference/mongo/mongo/gethosts.xml index 7a6f09ef53..20a16c898c 100644 --- a/reference/mongo/mongo/gethosts.xml +++ b/reference/mongo/mongo/gethosts.xml @@ -15,8 +15,10 @@ - This method can only be used with a connection to a replica set. It returns - the status of all of the hosts in the set. + This method is only useful with a connection to a replica set. It returns + the status of all of the hosts in the set. Without a replica set, it will + just return an array with one element containing the host that you are + connected to. @@ -44,6 +46,10 @@ array(2) { ["A:27017"]=> array(4) { + ["host"]=> + "A" + ["port"]=> + 27017 ["health"]=> int(1) ["state"]=> @@ -55,6 +61,10 @@ array(2) { } ["B:27017"]=> array(4) { + ["host"]=> + "B" + ["port"]=> + 27017 ["health"]=> int(1) ["state"]=> @@ -66,6 +76,10 @@ array(2) { } ["C:27017"]=> array(4) { + ["host"]=> + "C" + ["port"]=> + 27017 ["health"]=> int(1) ["state"]=> @@ -84,6 +98,36 @@ array(2) { thus is likely closer or handling less load) than C. + + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + 1.2.10 + + + Support for non-replicasets was added. + + + The returned array elements now also include the + hostname and port. + + + + + + + +