Documentation

ListCollectionNames
in package

FinalYes

Operation for the listCollectionNames helper.

Tags
see
Database::listCollectionNames()
see
https://mongodb.com/docs/manual/reference/command/listCollections/

Table of Contents

Properties

$listCollections  : ListCollections

Methods

__construct()  : mixed
Constructs a listCollections command.
execute()  : Iterator<int, string>
Execute the operation.

Properties

Methods

__construct()

Constructs a listCollections command.

public __construct(string $databaseName[, array<string|int, mixed> $options = [] ]) : mixed

Supported options:

  • authorizedCollections (boolean): Determines which collections are returned based on the user privileges.

    For servers < 4.0, this option is ignored.

  • comment (mixed): BSON value to attach as a comment to this command.

    This is not supported for servers versions < 4.4.

  • filter (document): Query by which to filter collections.

  • maxTimeMS (integer): The maximum amount of time to allow the query to run.

  • session (MongoDB\Driver\Session): Client session.

Parameters
$databaseName : string

Database name

$options : array<string|int, mixed> = []

Command options

Tags
throws
InvalidArgumentException

for parameter/option parsing errors

execute()

Execute the operation.

public execute(Server $server) : Iterator<int, string>
Parameters
$server : Server
Tags
throws
RuntimeException

for other driver errors (e.g. connection errors)

Return values
Iterator<int, string>

        
On this page

Search results