4 * This file is part of the Symfony CMF package.
6 * (c) 2011-2015 Symfony CMF
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Cmf\Component\Routing\Candidates;
14 use Symfony\Component\HttpFoundation\Request;
17 * Candidates is a subsystem useful for the route provider. It separates the
18 * logic for determining possible static prefixes from the route provider.
20 * @author David Buchmann <mail@davidbu.ch>
22 interface CandidatesInterface
25 * @param Request $request
27 * @return array a list of paths
29 public function getCandidates(Request $request);
32 * Determine if $name is a valid candidate, e.g. in getRouteByName.
38 public function isCandidate($name);
41 * Provide a best effort query restriction to limit a query to only find
42 * routes that are supported.
44 * @param object $queryBuilder A query builder suited for the storage backend.
46 public function restrictQuery($queryBuilder);