MongoCollection
PHP Manual

MongoCollection::__construct

(PECL mongo >=0.9.0)

MongoCollection::__constructCreates a new collection

说明

public MongoCollection::__construct ( MongoDB $db , string $name )

参数

MongoDB db

Parent database.

name

Name for this collection.

返回值

Returns a new collection object.

错误/异常

Throws default exception if the collection name is invalid.


MongoCollection
PHP Manual