IComposableProtocolProcessor.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. /**
  12. * Interface that defines a customizable protocol processor that serializes
  13. * Redis commands and parses replies returned by the server to PHP objects
  14. * using a pluggable set of classes defining the underlying wire protocol.
  15. *
  16. * @author Daniele Alessandri <suppakilla@gmail.com>
  17. */
  18. interface IComposableProtocolProcessor extends IProtocolProcessor
  19. {
  20. /**
  21. * Sets the command serializer to be used by the protocol processor.
  22. *
  23. * @param ICommandSerializer $serializer Command serializer.
  24. */
  25. public function setSerializer(ICommandSerializer $serializer);
  26. /**
  27. * Returns the command serializer used by the protocol processor.
  28. *
  29. * @return ICommandSerializer
  30. */
  31. public function getSerializer();
  32. /**
  33. * Sets the response reader to be used by the protocol processor.
  34. *
  35. * @param IResponseReader $reader Response reader.
  36. */
  37. public function setReader(IResponseReader $reader);
  38. /**
  39. * Returns the response reader used by the protocol processor.
  40. *
  41. * @return IResponseReader
  42. */
  43. public function getReader();
  44. }