CommandStartedEvent
class CommandStartedEvent (View source)
Encapsulates information about a failed command.
Methods
No description
Returns the command document The reply document will be converted from BSON to PHP using the default deserialization rules (e.g. BSON documents will be converted to stdClass).
Returns the command name.
Returns the database on which the command was executed.
Returns the server hostname for the command
Returns the command's operation ID.
Returns the server port for the command
Returns the command's request ID.
Returns the load balancer service ID for the command
Returns the server connection ID for the command
Details
final
__wakeup()
No description
final object
getCommand()
Returns the command document The reply document will be converted from BSON to PHP using the default deserialization rules (e.g. BSON documents will be converted to stdClass).
final string
getCommandName()
Returns the command name.
final string
getDatabaseName()
Returns the database on which the command was executed.
final string
getHost()
Returns the server hostname for the command
final string
getOperationId()
Returns the command's operation ID.
The operation ID is generated by the driver and may be used to link events together such as bulk write operations, which may have been split across several commands at the protocol level. Note: Since multiple commands may share the same operation ID, it is not reliable to use this value to associate event objects with each other. The request ID returned by MongoDB\Driver\Monitoring\CommandSucceededEvent::getRequestId() should be used instead.
final int
getPort()
Returns the server port for the command
final string
getRequestId()
Returns the command's request ID.
The request ID is generated by the driver and may be used to associate this CommandSucceededEvent with a previous CommandStartedEvent.
final Server
getServer()
deprecated
deprecated
Returns the Server on which the command was executed.
final ObjectId|null
getServiceId()
Returns the load balancer service ID for the command
final int|null
getServerConnectionId()
Returns the server connection ID for the command