Since: 1.0.0

final class Command (View source)

The MongoDB\Driver\Command class is a value object that represents a database command.

To provide "Command Helpers" the MongoDB\Driver\Command object should be composed.

Methods

__construct(array|object $document, array|null $commandOptions = null)

Construct new Command

__wakeup()

No description

Details

final __construct(array|object $document, array|null $commandOptions = null)

Since: 1.0.0

Construct new Command

Parameters

array|object $document

The complete command to construct

array|null $commandOptions

Do not use this parameter to specify options described in the command's reference in the MongoDB manual.

Exceptions

InvalidArgumentException

final __wakeup()

No description