Connection.php 782B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. namespace Illuminate\Contracts\Redis;
  3. use Closure;
  4. interface Connection
  5. {
  6. /**
  7. * Subscribe to a set of given channels for messages.
  8. *
  9. * @param array|string $channels
  10. * @param \Closure $callback
  11. * @return void
  12. */
  13. public function subscribe($channels, Closure $callback);
  14. /**
  15. * Subscribe to a set of given channels with wildcards.
  16. *
  17. * @param array|string $channels
  18. * @param \Closure $callback
  19. * @return void
  20. */
  21. public function psubscribe($channels, Closure $callback);
  22. /**
  23. * Run a command against the Redis database.
  24. *
  25. * @param string $method
  26. * @param array $parameters
  27. * @return mixed
  28. */
  29. public function command($method, array $parameters = []);
  30. }