Phalcon\Db\Adapter\MongoDB\Operation\DropIndexes::__construct PHP Méthode

__construct() public méthode

Supported options: * typeMap (array): Type map for BSON deserialization. This will be used for the returned command result document.
public __construct ( string $databaseName, string $collectionName, string $indexName, array $options = [] )
$databaseName string Database name
$collectionName string Collection name
$indexName string Index name (use "*" to drop all indexes)
$options array Command options
    public function __construct($databaseName, $collectionName, $indexName, array $options = [])
    {
        $indexName = (string) $indexName;
        if ($indexName === '') {
            throw new InvalidArgumentException('$indexName cannot be empty');
        }
        if (isset($options['typeMap']) && !is_array($options['typeMap'])) {
            throw InvalidArgumentException::invalidType('"typeMap" option', $options['typeMap'], 'array');
        }
        $this->databaseName = (string) $databaseName;
        $this->collectionName = (string) $collectionName;
        $this->indexName = $indexName;
        $this->options = $options;
    }