Drupal investigation

FinalMatcherInterface.php 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /*
  3. * This file is part of the Symfony CMF package.
  4. *
  5. * (c) 2011-2015 Symfony CMF
  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 Symfony\Cmf\Component\Routing\NestedMatcher;
  11. use Symfony\Component\HttpFoundation\Request;
  12. use Symfony\Component\Routing\RouteCollection;
  13. use Symfony\Component\Routing\Exception\ResourceNotFoundException;
  14. /**
  15. * A FinalMatcher returns only one route from a collection of candidate routes.
  16. *
  17. * @author Larry Garfield
  18. * @author David Buchmann
  19. */
  20. interface FinalMatcherInterface
  21. {
  22. /**
  23. * Matches a request against a route collection and returns exactly one result.
  24. *
  25. * @param RouteCollection $collection The collection against which to match.
  26. * @param Request $request The request to match.
  27. *
  28. * @return array An array of parameters
  29. *
  30. * @throws ResourceNotFoundException if none of the routes in $collection
  31. * matches $request
  32. */
  33. public function finalMatch(RouteCollection $collection, Request $request);
  34. }