public function filter($value)
    {
        // extract database
        $dbName = preg_match('~^mongodb://[^/]+/([^\?]+)~', $value, $match)
            ? $match[1]
            : $this->getDefaultDatabaseName();

        return $dbName;
    }