Phalcon\Db\Adapter\MongoDB\Database::dropCollection PHP Method

dropCollection() public method

Drop a collection within this database.
See also: DropCollection::__construct() for supported options
public dropCollection ( string $collectionName, array $options = [] ) : array | object
$collectionName string Collection name
$options array Additional options
return array | object Command result document
    public function dropCollection($collectionName, array $options = [])
    {
        if (!isset($options['typeMap'])) {
            $options['typeMap'] = $this->typeMap;
        }
        $operation = new DropCollection($this->databaseName, $collectionName, $options);
        $server = $this->manager->selectServer(new ReadPreference(ReadPreference::RP_PRIMARY));
        return $operation->execute($server);
    }