public function ChainRouter::setContext

Sets the request context.

@api

Parameters

RequestContext $context The context:

Overrides RequestContextAwareInterface::setContext

File

drupal/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/ChainRouter.php, line 243

Class

ChainRouter
ChainRouter

Namespace

Symfony\Cmf\Component\Routing

Code

public function setContext(RequestContext $context) {
  foreach ($this
    ->all() as $router) {
    if ($router instanceof RequestContextAwareInterface) {
      $router
        ->setContext($context);
    }
  }
  $this->context = $context;
}