/var/www/flurhymez/vendor/laravel/framework/src/Illuminate/Redis/Connections
Edit: /var/www/flurhymez/vendor/laravel/framework/src/Illuminate/Redis/Connections/PredisConnection.php (1675B)
client = $client;
}
/**
* Subscribe to a set of given channels for messages.
*
* @param array|string $channels
* @param \Closure $callback
* @param string $method
* @return void
*/
public function createSubscription($channels, Closure $callback, $method = 'subscribe')
{
$loop = $this->pubSubLoop();
$loop->{$method}(...array_values((array) $channels));
foreach ($loop as $message) {
if ($message->kind === 'message' || $message->kind === 'pmessage') {
call_user_func($callback, $message->payload, $message->channel);
}
}
unset($loop);
}
/**
* Flush the selected Redis database.
*
* @return void
*/
public function flushdb()
{
if (! $this->client->getConnection() instanceof ClusterInterface) {
return $this->command('flushdb');
}
foreach ($this->getConnection() as $node) {
$node->executeCommand(new ServerFlushDatabase);
}
}
}