RequestLocationInterface.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. namespace GuzzleHttp\Command\Guzzle\RequestLocation;
  3. use GuzzleHttp\Command\CommandInterface;
  4. use GuzzleHttp\Command\Guzzle\Operation;
  5. use GuzzleHttp\Command\Guzzle\Parameter;
  6. use Psr\Http\Message\RequestInterface;
  7. /**
  8. * Handles locations specified in a service description
  9. */
  10. interface RequestLocationInterface
  11. {
  12. /**
  13. * Visits a location for each top-level parameter
  14. *
  15. * @param CommandInterface $command Command being prepared
  16. * @param RequestInterface $request Request being modified
  17. * @param Parameter $param Parameter being visited
  18. *
  19. * @return RequestInterface Modified request
  20. */
  21. public function visit(
  22. CommandInterface $command,
  23. RequestInterface $request,
  24. Parameter $param
  25. );
  26. /**
  27. * Called when all of the parameters of a command have been visited.
  28. *
  29. * @param CommandInterface $command Command being prepared
  30. * @param RequestInterface $request Request being modified
  31. * @param Operation $operation Operation being serialized
  32. *
  33. * @return RequestInterface Modified request
  34. */
  35. public function after(
  36. CommandInterface $command,
  37. RequestInterface $request,
  38. Operation $operation
  39. );
  40. }