CommandExecuted.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. namespace Illuminate\Redis\Events;
  3. class CommandExecuted
  4. {
  5. /**
  6. * The Redis command that was executed.
  7. *
  8. * @var string
  9. */
  10. public $command;
  11. /**
  12. * The array of command parameters.
  13. *
  14. * @var array
  15. */
  16. public $parameters;
  17. /**
  18. * The number of milliseconds it took to execute the command.
  19. *
  20. * @var float
  21. */
  22. public $time;
  23. /**
  24. * The Redis connection instance.
  25. *
  26. * @var \Illuminate\Redis\Connections\Connection
  27. */
  28. public $connection;
  29. /**
  30. * The Redis connection name.
  31. *
  32. * @var string
  33. */
  34. public $connectionName;
  35. /**
  36. * Create a new event instance.
  37. *
  38. * @param string $command
  39. * @param array $parameters
  40. * @param float|null $time
  41. * @param \Illuminate\Redis\Connections\Connection $connection
  42. */
  43. public function __construct($command, $parameters, $time, $connection)
  44. {
  45. $this->time = $time;
  46. $this->command = $command;
  47. $this->parameters = $parameters;
  48. $this->connection = $connection;
  49. $this->connectionName = $connection->getName();
  50. }
  51. }