MongoCollection::__construct
(PECL mongo >=0.9.0)
MongoCollection::__construct — Creates a new collection
Beskrivelse
public MongoCollection::__construct
(
MongoDB $db
,
string $name
)
Parametre
-
MongoDB
db
-
Parent database.
-
name
-
Name for this collection.
Returnerings Værdier
Returns a new collection object.
Fejl/Undtagelser
Throws default exception if the collection name is invalid.