Record a Redis command was executed.

@param  \Illuminate\Redis\Events\CommandExecuted  $event
@return void
434361
public function recordCommand(CommandExecuted $event)
    {
        if (! Telescope::isRecording() || $this->shouldIgnore($event)) {
            return;
        }

        Telescope::recordRedis(IncomingEntry::make([
            'connection' => $event->connectionName,
            'command' => $this->formatCommand($event->command, $event->parameters),
            'time' => number_format($event->time, 2),
        ]));
    }
664515
public function handle(QueryExecuted $event)
    {
        try {
            $bindings   = (array) $event->bindings;
            $duration   = $event->time;
            $connection = $event->connection->getName();
            $data       = \compact('bindings', 'duration', 'connection');

            // Format binding data
            foreach ($bindings as $i => $binding) {
                if ($binding instanceof DateTime) {
                    $bindings[$i] = $binding->format('Y-m-d H:i:s');
                } else {
                    if (\is_string($binding)) {
                        $bindings[$i] = "'$binding'";
                    }
                }
            }

            // Insert bindings into query
            $query_string = \str_replace(['%', '?'], ['%%', '%s'], $event->sql);
            $query_string = \vsprintf($query_string, $bindings);

            $this->logger->log($this->loggingLevel(), "Database query [$query_string]", $data);
        } catch (Exception $e) {
            $this->logger->error("Cannot log database query: {$e->getMessage()}", ['exception' => $e]);
        }
    }
932707
public function recordThat(Event $event): void
    {
        $this->handleRecursively($event);
        parent::recordThat($event);
    }
244317
public function onCommand($event)
    {
        $this->data['commands'][] = array(
            'command' => $event->getCommand(),
            'arguments' => $event->getArguments(),
            'executiontime' => $event->getExecutionTime(),
        );
    }
1311479
public void execRun(String command) throws IOException, PHPException {
	    writeCommand("R" + command);
	    phpConsoleLogger.write(command);
		String readLine = readLine();
        phpConsoleLogger.read(readLine);
		
	}
547792
public function beforeExecution(BeforeShellCommandExecutionEvent $event)
    {
        // Get the command the user entered.
        $cmd = $event->getCommand();

        // Replace " with '.
        $cmd = str_replace('"', '\'', $cmd);

        $event->setCommand($cmd);
    }
667679
public function recordCommand(CommandStarting $event)
    {
        if (! Telescope::isRecording() ||
            $event->command !== 'schedule:run' &&
            $event->command !== 'schedule:finish') {
            return;
        }

        collect(app(Schedule::class)->events())->each(function ($event) {
            $event->then(function () use ($event) {
                Telescope::recordScheduledCommand(IncomingEntry::make([
                    'command' => $event instanceof CallbackEvent ? 'Closure' : $event->command,
                    'description' => $event->description,
                    'expression' => $event->expression,
                    'timezone' => $event->timezone,
                    'user' => $event->user,
                    'output' => $this->getEventOutput($event),
                ]));
            });
        });
    }
465340
public function command(ConsoleCommandEvent $event)
    {
        /** @var ManifestCommand $command */
        $command = $event->getCommand();

        if (!in_array($command->getName(), $this->getSupportedCommands())) {
            return;
        }

        $command->setChain($this->chain);

        if ($command instanceof RunCommand) {
            $command->setEventDispatcher($this->dispatcher);
        }
    }
811788
public function recordThat(Event $event): void
    {
        $this->eventCollection()->record(EventMessage::create($event));
    }
278346
protected static function createCommand($event)
    {
        $extra = $event->getComposer()->getPackage()->getExtra();
        $command = 'ckeditor:install';

        if (isset($extra['ckeditor-path'])) {
            $command .= ' '.$extra['ckeditor-path'];
        }

        if (isset($extra['ckeditor-release'])) {
            $command .= ' --release='.$extra['ckeditor-release'];
        }

        if (isset($extra['ckeditor-tag'])) {
            $command .= ' --tag='.$extra['ckeditor-tag'];
        }

        if (isset($extra['ckeditor-clear'])) {
            $command .= ' --clear='.$extra['ckeditor-clear'];
        }

        if (isset($extra['ckeditor-exclude'])) {
            foreach ($extra['ckeditor-exclude'] as $exclude) {
                $command .= ' --exclude='.$exclude;
            }
        }

        return $command;
    }
437824
protected function sendCommandToServer(string $command): void
	{
		$this->lastCommand = $command;

		$this->connection->write($command);
	}
716442
private function cleanExtraCommandArgument(Command $command): void
    {
        $arguments = $command->getDefinition()->getArguments();
        if (! isset($arguments['command'])) {
            return;
        }

        unset($arguments['command']);
        $command->getDefinition()->setArguments($arguments);
    }
650028
public function handleQueryExecute(QueryExecuteEvent $event)
    {
        $query = $event->getQuery();
        $locale = $query->getLocale();
        $phpcrResult = $query->getPhpcrQuery()->execute();

        $event->setResult(
            new QueryResultCollection($phpcrResult, $this->eventDispatcher, $locale, $event->getOptions())
        );
    }
1251785
public function createCommand($event) {
        if (!empty($this->commands[$event->name])) {
            if (is_callable($this->condition) && call_user_func($this->condition, $this->owner) === false) {
                return;
            }
            $class = $this->commands[$event->name];
            $command = new $class();
            if (($command instanceof CommandInterface) === false) {
                throw new InvalidParamException('Class name [' . get_class($class) . '] provided in "commands" param MUST implement the jlorente\command\base\CommandInterface interface');
            }
            $command->setReceiver($this->owner);
            CommandMapper::map($command);
        }
    }
743295
public function authorizeRequest(Event $event)
    {
        /* @var \Guzzle\Service\Command\CommandInterface $command */
        $command = $event['command'];

        $request = $command->getRequest();
        $request->setAuth($this->apiKey);
    }
639308
public function onCommandAfterPrepare(Event $event) {

        $command = $event['command'];
        $bucket = $command['Bucket'];
        $request = $command->getRequest();
        if ($command->getName() == 'ListBuckets')
        {
            if ($this->ipport != null) {
                $request->setHost($this->ipport);
                $request->setHeader('Host', 'service.cos.myqcloud.com');
            } else if ($this->endpoint != null) {
                $request->setHost($this->endpoint);
                $request->setHeader('Host', 'service.cos.myqcloud.com');
            }
            else {

                $request->setHost('service.cos.myqcloud.com');
            }
            return ;
        }
        if ($key = $command['Key']) {
            // Modify the command Key to account for the {/Key*} explosion into an array
            if (is_array($key)) {
                $command['Key'] = $key = implode('/', $key);
            }
        }
        $request->setHeader('Date', gmdate('D, d M Y H:i:s T'));
        $request->setPath(preg_replace("#^/{$bucket}#", '', $request->getPath()));

        if ($this->appId != null && endWith($bucket,'-'.$this->appId) == False)
        {
            $bucket = $bucket.'-'.$this->appId;
        }
//        $request->setPath(urldecode($request->getPath()));
        $request->getParams()->set('bucket', $bucket)->set('key', $key);

        $realHost = $bucket. '.' . $request->getHost();
        if($this->ipport != null) {
            $request->setHost($this->ipport);
            $request->setHeader('Host', $realHost);
        } else {
            if($this->endpoint != null) {
                $tmp = $bucket. '.' . $this->endpoint;
                $request->setHost($tmp);
            } else {
                $request->setHost($realHost);
            }
        }
        if (!$bucket) {
            $request->getParams()->set('cos.resource', '/');
        } else {
            // Bucket style needs a trailing slash
            $request->getParams()->set(
                'cos.resource',
                '/' . rawurlencode($bucket) . ($key ? ('/' . Client::encodeKey($key)) : '/')
            );
        }
    }
853439
public function issueWarnings(ConsoleCommandEvent $event) {
    $command = $event->getCommand();
    $command_name = $command->getName();

    // The inspector tracks whether warnings have been issued because it is
    // shared in the container.
    $this->getInspector()->issueEnvironmentWarnings($command_name);
  }