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