3 namespace Drupal\Core\Routing;
6 * Rebuilds the route information and dumps it.
8 * Rebuilding the route information is the process of gathering all routing data
9 * from .routing.yml files, creating a
10 * \Symfony\Component\Routing\RouteCollection object out of it, and dispatching
11 * that object as a \Drupal\Core\Routing\RouteBuildEvent to all registered
12 * listeners. After that, the \Symfony\Component\Routing\RouteCollection object
13 * is used to dump the data. Examples of a dump include filling up the routing
14 * table, auto-generating Apache mod_rewrite rules, or auto-generating a PHP
17 * @see \Drupal\Core\Routing\MatcherDumperInterface
18 * @see \Drupal\Core\Routing\RouteProviderInterface
22 interface RouteBuilderInterface {
25 * Rebuilds the route information and dumps it.
28 * Returns TRUE if the rebuild succeeds, FALSE otherwise.
30 public function rebuild();
33 * Rebuilds the route information if necessary, and dumps it.
36 * Returns TRUE if the rebuild occurs, FALSE otherwise.
38 public function rebuildIfNeeded();
41 * Sets the router to be rebuilt next time rebuildIfNeeded() is called.
43 public function setRebuildNeeded();