IResponseHandler.php 812 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /*
  3. * This file is part of the Predis package.
  4. *
  5. * (c) Daniele Alessandri <suppakilla@gmail.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Predis\Protocol;
  11. use Predis\Network\IConnectionComposable;
  12. /**
  13. * Interface that defines an handler able to parse a reply.
  14. *
  15. * @author Daniele Alessandri <suppakilla@gmail.com>
  16. */
  17. interface IResponseHandler
  18. {
  19. /**
  20. * Parses a type of reply returned by Redis and reads more data from the
  21. * connection if needed.
  22. *
  23. * @param IConnectionComposable $connection Connection to Redis.
  24. * @param string $payload Initial payload of the reply.
  25. * @return mixed
  26. */
  27. function handle(IConnectionComposable $connection, $payload);
  28. }