MongoClient::selectCollection PHP Метод

selectCollection() публичный Метод

Gets a database collection
public selectCollection ( string $db, string $collection ) : MongoCollection
$db string - The database name.
$collection string - The collection name.
Результат MongoCollection - Returns a new collection object.
    public function selectCollection($db, $collection)
    {
        return $this->selectDB($db)->selectCollection($collection);
    }

Usage Example

Пример #1
0
 protected function getCollection()
 {
     if (!$this->coll) {
         $this->coll = $this->mongoClient->selectCollection($this->dbName, $this->collName);
     }
     return $this->coll;
 }
All Usage Examples Of MongoClient::selectCollection