Skip to content

Instantly share code, notes, and snippets.

@jsor
Created November 30, 2012 16:17
Show Gist options
  • Select an option

  • Save jsor/4176748 to your computer and use it in GitHub Desktop.

Select an option

Save jsor/4176748 to your computer and use it in GitHub Desktop.
class RedisMonitor
{
private $redis;
public function __construct(Client $redis)
{
$this->redis = $redis;
}
public function __invoke()
{
$this->redis
->connect()
->then(function($client) {
$client->monitor(function ($event) {
echo $event->payload;
});
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment