CommandInterface.php 994 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace GuzzleHttp\Command;
  3. use GuzzleHttp\HandlerStack;
  4. /**
  5. * A command object encapsulates the input parameters used to control the
  6. * creation of a HTTP request and processing of a HTTP response.
  7. *
  8. * Using the getParams() method will return the input parameters of the command
  9. * as an associative array.
  10. */
  11. interface CommandInterface extends \ArrayAccess, \IteratorAggregate, \Countable, ToArrayInterface
  12. {
  13. /**
  14. * Retrieves the handler stack specific to this command's execution.
  15. *
  16. * This can be used to add middleware that is specific to the command instance.
  17. *
  18. * @return HandlerStack
  19. */
  20. public function getHandlerStack();
  21. /**
  22. * Get the name of the command.
  23. *
  24. * @return string
  25. */
  26. public function getName();
  27. /**
  28. * Check if the command has a parameter by name.
  29. *
  30. * @param string $name Name of the parameter to check.
  31. *
  32. * @return bool
  33. */
  34. public function hasParam($name);
  35. }