CommandSubscriber
interface CommandSubscriber implements Subscriber (View source)
Classes may implement this interface to register an event subscriber that is notified for each started, successful, and failed command event.
Methods
Details
void
commandFailed(CommandFailedEvent $event)
Notification method for a failed command.
If the subscriber has been registered with MongoDB\Driver\Monitoring\addSubscriber(), the driver will call this method when a command has failed.
void
commandStarted(CommandStartedEvent $event)
Notification method for a started command.
If the subscriber has been registered with MongoDB\Driver\Monitoring\addSubscriber(), the driver will call this method when a command has started.
void
commandSucceeded(CommandSucceededEvent $event)
Notification method for a successful command.
If the subscriber has been registered with MongoDB\Driver\Monitoring\addSubscriber(), the driver will call this method when a command has succeeded.