Drupal investigation

CandidatesInterface.php 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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\Candidates;
  11. use Symfony\Component\HttpFoundation\Request;
  12. /**
  13. * Candidates is a subsystem useful for the route provider. It separates the
  14. * logic for determining possible static prefixes from the route provider.
  15. *
  16. * @author David Buchmann <mail@davidbu.ch>
  17. */
  18. interface CandidatesInterface
  19. {
  20. /**
  21. * @param Request $request
  22. *
  23. * @return array a list of paths
  24. */
  25. public function getCandidates(Request $request);
  26. /**
  27. * Determine if $name is a valid candidate, e.g. in getRouteByName.
  28. *
  29. * @param string $name
  30. *
  31. * @return bool
  32. */
  33. public function isCandidate($name);
  34. /**
  35. * Provide a best effort query restriction to limit a query to only find
  36. * routes that are supported.
  37. *
  38. * @param object $queryBuilder A query builder suited for the storage backend.
  39. */
  40. public function restrictQuery($queryBuilder);
  41. }