Home/
Manual/
monitoring / commandsubscriber/ MongoDB\Driver\Monitoring\CommandSubscriber::commandStarted
MongoDB\Driver\Monitoring\CommandSubscriber::commandStarted
PHP function
Edit on GitHub ✎
(mongodb >=1.3.0)
Notification method for a started command
Description
MongoDB\Driver\Monitoring\CommandSubscriber::commandStarted(MongoDB\Driver\Monitoring\CommandStartedEvent $event): void
If the subscriber is registered, this method is called when a command is sent to the server.
Parameters
event(MongoDB\Driver\Monitoring\CommandStartedEvent)An event object encapsulating information about the started command.
Return Values
Void
Errors/Exceptions
See Also
MongoDB\Driver\Monitoring\CommandStartedEventMongoDB\Driver\Monitoring\addSubscriber()MongoDB\Driver\Manager::addSubscriber()- mongodb.tutorial.apm