class NullMatcherDumper
Same name in other branches
- 9 core/lib/Drupal/Core/Routing/NullMatcherDumper.php \Drupal\Core\Routing\NullMatcherDumper
- 8.9.x core/lib/Drupal/Core/Routing/NullMatcherDumper.php \Drupal\Core\Routing\NullMatcherDumper
- 10 core/lib/Drupal/Core/Routing/NullMatcherDumper.php \Drupal\Core\Routing\NullMatcherDumper
Does not dump Route information.
Hierarchy
- class \Drupal\Core\Routing\NullMatcherDumper implements \Drupal\Core\Routing\MatcherDumperInterface
Expanded class hierarchy of NullMatcherDumper
File
-
core/
lib/ Drupal/ Core/ Routing/ NullMatcherDumper.php, line 10
Namespace
Drupal\Core\RoutingView source
class NullMatcherDumper implements MatcherDumperInterface {
/**
* The routes to be dumped.
*
* @var \Symfony\Component\Routing\RouteCollection
*/
protected $routes;
/**
* {@inheritdoc}
*/
public function addRoutes(RouteCollection $routes) {
if (empty($this->routes)) {
$this->routes = $routes;
}
else {
$this->routes
->addCollection($routes);
}
}
/**
* Dumps a set of routes to the router table in the database.
*
* Available options:
* - provider: The route grouping that is being dumped. All existing
* routes with this provider will be deleted on dump.
* - base_class: The base class name.
*
* @param array $options
* An array of options.
*/
public function dump(array $options = []) : string {
// The dumper is reused for multiple providers, so reset the queued routes.
$this->routes = NULL;
return '';
}
/**
* Gets the routes to match.
*
* @return \Symfony\Component\Routing\RouteCollection
* A RouteCollection instance representing all routes currently in the
* dumper.
*/
public function getRoutes() : RouteCollection {
return $this->routes;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
NullMatcherDumper::$routes | protected | property | The routes to be dumped. | |
NullMatcherDumper::addRoutes | public | function | Adds additional routes to be dumped. | Overrides MatcherDumperInterface::addRoutes |
NullMatcherDumper::dump | public | function | Dumps a set of routes to the router table in the database. | |
NullMatcherDumper::getRoutes | public | function | Gets the routes to match. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.