From 96ac68c5999764578297bf2aac2854da0f94362a Mon Sep 17 00:00:00 2001 From: Jeremy Mikola Date: Thu, 15 Jan 2015 16:24:54 +0000 Subject: [PATCH] Fix example output for MongoCollection::getIndexInfo() The previous output looked nothing like var_dump(). The indexes are are comparable to those in the previous example, although there are some additional fields and I changed the geo-spatial index to "2dsphere". git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@335757 c90b9560-bf6c-de11-be94-00142212c4b1 --- .../mongo/mongocollection/getindexinfo.xml | 98 ++++++++++++------- 1 file changed, 62 insertions(+), 36 deletions(-) diff --git a/reference/mongo/mongocollection/getindexinfo.xml b/reference/mongo/mongocollection/getindexinfo.xml index c3ac0965ed..c7b4efeabb 100644 --- a/reference/mongo/mongocollection/getindexinfo.xml +++ b/reference/mongo/mongocollection/getindexinfo.xml @@ -51,42 +51,68 @@ var_dump($c->getIndexInfo()); &example.outputs.similar; array( - "v" => 1, - "key" => array( - "_id" => 1, - ), - "ns" => "test.venues", - "name" => "_id_", - ), - 1 => array( - "v" => 1, - "key" => array( - "name" => 1, - ), - "unique" : true, - "ns" => "test.venues", - "name" => "name_1", - ), - 2 => array( - "v" => 1, - "key" => array( - "type" => 1, - "createdAt" => -1, - ), - "ns" => "test.venues", - "name" => "type_1_createdAt_-1", - ), - 3 => array( - "v" => 1, - "key" => array( - "location" => "2d", - ), - "ns" => "test.venues", - "name" => "location_2d", - ), -) +array(4) { + [0]=> + array(4) { + ["v"]=> + int(1) + ["key"]=> + array(1) { + ["_id"]=> + int(1) + } + ["name"]=> + string(4) "_id_" + ["ns"]=> + string(11) "test.venues" + } + [1]=> + array(4) { + ["v"]=> + int(1) + ["key"]=> + array(1) { + ["name"]=> + float(1) + } + ["name"]=> + string(6) "name_1" + ["ns"]=> + string(11) "test.venues" + } + [2]=> + array(4) { + ["v"]=> + int(1) + ["key"]=> + array(2) { + ["type"]=> + float(1) + ["createdAt"]=> + float(-1) + } + ["name"]=> + string(19) "type_1_createdAt_-1" + ["ns"]=> + string(11) "test.venues" + } + [3]=> + array(5) { + ["v"]=> + int(1) + ["key"]=> + array(1) { + ["location"]=> + string(8) "2dsphere" + } + ["name"]=> + string(17) "location_2dsphere" + ["ns"]=> + string(11) "test.venues" + ["2dsphereIndexVersion"]=> + int(2) + } +} ]]>