PipelineExecutorInterface.php 863 B

123456789101112131415161718192021222324252627282930313233
  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\Pipeline;
  11. use SplQueue;
  12. use Predis\Connection\ConnectionInterface;
  13. /**
  14. * Defines a strategy to write a list of commands to the network
  15. * and read back their replies.
  16. *
  17. * @author Daniele Alessandri <suppakilla@gmail.com>
  18. */
  19. interface PipelineExecutorInterface
  20. {
  21. /**
  22. * Writes a list of commands to the network and reads back their replies.
  23. *
  24. * @param ConnectionInterface $connection Connection to Redis.
  25. * @param SplQueue $commands Commands queued for execution.
  26. * @return array
  27. */
  28. public function execute(ConnectionInterface $connection, SplQueue $commands);
  29. }