MongoDB::command
MongoDB::createCollection
MongoDB
PHP Manual

# MongoDB::__construct

(PECL mongo >=0.9.0)

MongoDB::__construct — Creates a new database

### Descripción

MongoDB::__construct ( Mongo `$conn` , string `$name` )

### Lista de parámetros

Mongo `conn`

  Database connection.

`name`

  Database name.

### Valores retornados

Returns the database.

### Errors/Exceptions

Throws InvalidArgumentException if the database name is invalid.

MongoDB::command
MongoDB::createCollection
MongoDB
PHP Manual