Phalcon\Db\Adapter\MongoDB\Operation\ListCollections::__construct PHP Method

__construct() public method

Supported options: * filter (document): Query by which to filter collections. * maxTimeMS (integer): The maximum amount of time to allow the query to run.
public __construct ( string $databaseName, array $options = [] )
$databaseName string Database name
$options array Command options
    public function __construct($databaseName, array $options = [])
    {
        if (isset($options['filter']) && !is_array($options['filter']) && !is_object($options['filter'])) {
            throw InvalidArgumentException::invalidType('"filter" option', $options['filter'], 'array or object');
        }
        if (isset($options['maxTimeMS']) && !is_integer($options['maxTimeMS'])) {
            throw InvalidArgumentException::invalidType('"maxTimeMS" option', $options['maxTimeMS'], 'integer');
        }
        $this->databaseName = (string) $databaseName;
        $this->options = $options;
    }