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