You are here

private function ChainRouter::getErrorMessage in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony-cmf/routing/ChainRouter.php \Symfony\Cmf\Component\Routing\ChainRouter::getErrorMessage()
1 call to ChainRouter::getErrorMessage()
ChainRouter::generate in vendor/symfony-cmf/routing/ChainRouter.php
Loops through all registered routers and returns a router if one is found. It will always return the first route generated.

File

vendor/symfony-cmf/routing/ChainRouter.php, line 251

Class

ChainRouter
The ChainRouter allows to combine several routers to try in a defined order.

Namespace

Symfony\Cmf\Component\Routing

Code

private function getErrorMessage($name, $router = null, $parameters = null) {
  if ($router instanceof VersatileGeneratorInterface) {
    $displayName = $router
      ->getRouteDebugMessage($name, $parameters);
  }
  elseif (is_object($name)) {
    $displayName = method_exists($name, '__toString') ? (string) $name : get_class($name);
  }
  else {
    $displayName = (string) $name;
  }
  return "Route '{$displayName}' not found";
}