diff --git a/reference/mongo/mongodb/getcollectionnames.xml b/reference/mongo/mongodb/getcollectionnames.xml new file mode 100644 index 0000000000..41fcbe8c1b --- /dev/null +++ b/reference/mongo/mongodb/getcollectionnames.xml @@ -0,0 +1,91 @@ + + + + + + MongoDB::getCollectionNames + Get all collections from this database + + + + &reftitle.description; + + public arrayMongoDB::getCollectionNames + boolincludeSystemCollectionsfalse + + + Returns an array of all the collection names for the given database. + + + + + + &reftitle.parameters; + + + includeSystemCollections + + + Include system collections. + + + + + + + + &reftitle.returnvalues; + + Returns the names of the all the collections in the database as an array. + + + + + &reftitle.examples; + + <function>MongoDB::getCollectionNames</function> example + +selectDB("demo")->getCollectionNames());' +var_dump($collections); +]]> + + &example.outputs.similar; + + + string(9) "addresses" + [1]=> + string(5) "users" +} +]]> + + + + + + + diff --git a/reference/mongo/mongodb/listcollections.xml b/reference/mongo/mongodb/listcollections.xml index 58f4a0f6c1..78e35600e8 100644 --- a/reference/mongo/mongodb/listcollections.xml +++ b/reference/mongo/mongodb/listcollections.xml @@ -4,25 +4,65 @@ MongoDB::listCollections - Get a list of collections in this database + Get an of MongoCollection for this database + &reftitle.description; public arrayMongoDB::listCollections - + boolincludeSystemCollectionsfalse + + Gets a list of all the collections in the database and returns them as an + array of MongoCollection objects. + + - &reftitle.parameters; - &no.function.parameters; + &reftitle.parameters; + + + includeSystemCollections + + + Include system collections. + + + + + &reftitle.returnvalues; - Returns a list of MongoCollections. + Returns an array of MongoCollections. + + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + 1.3.0 + + Added the includeSystemCollections parameter. + + + + + + + + &reftitle.examples; diff --git a/reference/mongo/versions.xml b/reference/mongo/versions.xml index 059a32b9e3..7d1ec66efa 100644 --- a/reference/mongo/versions.xml +++ b/reference/mongo/versions.xml @@ -35,6 +35,7 @@ +