ICommandProcessorChain.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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\Commands\Processors;
  11. /**
  12. * A command processor chain processes a command using multiple chained command
  13. * processor before it is sent to Redis.
  14. *
  15. * @author Daniele Alessandri <suppakilla@gmail.com>
  16. */
  17. interface ICommandProcessorChain extends ICommandProcessor, \IteratorAggregate, \Countable
  18. {
  19. /**
  20. * Adds a command processor.
  21. *
  22. * @param ICommandProcessor $processor A command processor.
  23. */
  24. public function add(ICommandProcessor $processor);
  25. /**
  26. * Removes a command processor from the chain.
  27. *
  28. * @param ICommandProcessor $processor A command processor.
  29. */
  30. public function remove(ICommandProcessor $processor);
  31. /**
  32. * Returns an ordered list of the command processors in the chain.
  33. *
  34. * @return array
  35. */
  36. public function getProcessors();
  37. }