public function listDatabases(array $options = [])
    {
        $operation = new ListDatabases($options);
        $server = $this->manager->selectServer(new ReadPreference(ReadPreference::RP_PRIMARY));

        return $operation->execute($server);
    }
public function listDatabases(array $options = [])
    {
        $operation = new ListDatabases($options);
        $server = $this->manager->selectServer(new ReadPreference(ReadPreference::RP_PRIMARY));

        return $operation->execute($server);
    }
public function listDatabases ( array $ options = [ ] ) { $ operation = new ListDatabases ( $ options ) ; $ server = $ this -> manager -> selectServer ( new ReadPreference ( ReadPreference :: RP_PRIMARY ) ) ; return $ operation -> execute ( $ server ) ; }
List databases.

@see ListDatabases::__construct() for supported options
@return DatabaseInfoIterator
@throws UnexpectedValueException if the command response was malformed
@throws InvalidArgumentException for parameter/option parsing errors
@throws DriverRuntimeException for other driver errors (e.g. connection errors)
List databases .