Mongo::__toString
MongoDB::command
Mongo
PHP Manual

# The MongoDB class

## Introdução

Instances of this class are used to interact with a database. To get a database:

    <?php
    $m = new Mongo(); // connect
    $db = $m->selectDB("example");
    ?>

Database names can use almost any character in the ASCII range. However, they cannot contain " ", "." or be the empty string.

A few unusual, but valid, database names: "null", "[x,y]", "3", "\"", "/".

Unlike collection names, database names may contain "$".

## Sinopse da classe

MongoDB
MongoDB {
/* Methods */
public array command ( array `$data` )
__construct ( Mongo `$conn` , string `$name` )
public MongoCollection createCollection ( string `$name` [, bool `$capped`= `FALSE` [, int `$size`= 0 [, int `$max`= 0 ]]] )
public array createDBRef ( mixed `$ns` , mixed `$a` )
public array drop ( void )
public array dropCollection ( mixed `$coll` )
public array execute ( mixed `$code` [, array `$args`= array() ] )
public array getCursorInfo ( void )
public array getDBRef ( array `$ref` )
public MongoGridFS getGridFS ([ string `$arg1`= "fs" [, string `$arg2`= `NULL` ]] )
public int getProfilingLevel ( void )
public array listCollections ( void )
public array repair ([ bool `$preserve_cloned_files`= `FALSE` [, bool `$backup_original_files`= `FALSE` ]] )
public MongoCollection selectCollection ( string `$name` )
public int setProfilingLevel ( int `$level` )
public string __toString ( void )
}

## Índice

- MongoDB::command — Execute a database command
- MongoDB::__construct — Creates a new database
- MongoDB::createCollection — Creates a collection
- MongoDB::createDBRef — Creates a database reference
- MongoDB::drop — Drops this database
- MongoDB::dropCollection — Drops a collection
- MongoDB::execute — Runs JavaScript code on the database server.
- MongoDB::getCursorInfo — Gets information from the database about cursors
- MongoDB::getDBRef — Fetches the document pointed to by a database reference
- MongoDB::getGridFS — Fetches toolkit for dealing with files stored in this database
- MongoDB::getProfilingLevel — Gets this database's profiling level
- MongoDB::listCollections — Get a list of collections in this database
- MongoDB::repair — Repairs and compacts this database
- MongoDB::selectCollection — Gets a collection
- MongoDB::setProfilingLevel — Sets this database's profiling level
- MongoDB::__toString — The name of this database

Mongo::__toString
MongoDB::command
Mongo
PHP Manual