RequestMatcher.php 673 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace Http\Message;
  3. use Psr\Http\Message\RequestInterface;
  4. /**
  5. * Match a request.
  6. *
  7. * PSR-7 equivalent of Symfony's RequestMatcher
  8. *
  9. * @see https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpFoundation/RequestMatcherInterface.php
  10. *
  11. * @author Joel Wurtz <joel.wurtz@gmail.com>
  12. */
  13. interface RequestMatcher
  14. {
  15. /**
  16. * Decides whether the rule(s) implemented by the strategy matches the supplied request.
  17. *
  18. * @param RequestInterface $request The PSR7 request to check for a match
  19. *
  20. * @return bool true if the request matches, false otherwise
  21. */
  22. public function matches(RequestInterface $request);
  23. }