Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
eZ\Bundle\EzPublishCoreBundle\Routing\DefaultRouter Class Reference

Extension of Symfony default router implementing RequestMatcherInterface. More...

Inheritance diagram for eZ\Bundle\EzPublishCoreBundle\Routing\DefaultRouter:

## Public Member Functions
| setConfigResolver (ConfigResolverInterface $configResolver)
| setSiteAccess (SiteAccess $siteAccess=null)
| setNonSiteAccessAwareRoutes (array $routes)
| Injects route names that are not supposed to be SiteAccess aware. More...
| setSiteAccessRouter (SiteAccessRouterInterface $siteAccessRouter)
| matchRequest (Request $request)
| generate ($name, $parameters=[], $referenceType=self::ABSOLUTE_PATH)
| getContextBySimplifiedRequest (SimplifiedRequest $simplifiedRequest)
| Merges context from $simplifiedRequest into a clone of the current context. More...

## Protected Member Functions
| isSiteAccessAwareRoute ($routeName)
| Checks if $routeName is a siteAccess aware route, and thus needs to have siteAccess URI prepended. More...

## Protected Attributes
| $siteAccess
| $nonSiteAccessAwareRoutes = []
| $configResolver
| $siteAccessRouter

## Detailed Description

Extension of Symfony default router implementing RequestMatcherInterface.

Definition at line 23 of file DefaultRouter.php.

## Member Function Documentation

## ◆ generate()

eZ\Bundle\EzPublishCoreBundle\Routing\DefaultRouter::generate | ( |  | $name,
|  |  | $parameters = `[]`,
|  |  | $referenceType = `self::ABSOLUTE_PATH`
| ) |  |

Definition at line 70 of file DefaultRouter.php.

References eZ\Bundle\EzPublishCoreBundle\Routing\DefaultRouter\$siteAccess, eZ\Bundle\EzPublishCoreBundle\Routing\DefaultRouter\getContextBySimplifiedRequest(), and eZ\Bundle\EzPublishCoreBundle\Routing\DefaultRouter\isSiteAccessAwareRoute().

## ◆ getContextBySimplifiedRequest()

eZ\Bundle\EzPublishCoreBundle\Routing\DefaultRouter::getContextBySimplifiedRequest | ( | SimplifiedRequest | $simplifiedRequest | ) |

Merges context from $simplifiedRequest into a clone of the current context.

Parameters

  \eZ\Publish\Core\MVC\Symfony\Routing\SimplifiedRequest | $simplifiedRequest |

Returns
  \Symfony\Component\Routing\RequestContext

Definition at line 151 of file DefaultRouter.php.

Referenced by eZ\Bundle\EzPublishCoreBundle\Routing\DefaultRouter\generate().

## ◆ isSiteAccessAwareRoute()

eZ\Bundle\EzPublishCoreBundle\Routing\DefaultRouter::isSiteAccessAwareRoute | ( |  | $routeName | ) |
| protected

Checks if $routeName is a siteAccess aware route, and thus needs to have siteAccess URI prepended.

Will be used for link generation, only in the case of URI SiteAccess matching.

Parameters

  $routeName |

Returns
  bool

Definition at line 133 of file DefaultRouter.php.

Referenced by eZ\Bundle\EzPublishCoreBundle\Routing\DefaultRouter\generate().

## ◆ matchRequest()

eZ\Bundle\EzPublishCoreBundle\Routing\DefaultRouter::matchRequest | ( | Request | $request | ) |

Definition at line 65 of file DefaultRouter.php.

## ◆ setConfigResolver()

eZ\Bundle\EzPublishCoreBundle\Routing\DefaultRouter::setConfigResolver | ( | ConfigResolverInterface | $configResolver | ) |

Definition at line 36 of file DefaultRouter.php.

References eZ\Bundle\EzPublishCoreBundle\Routing\DefaultRouter\$configResolver.

## ◆ setNonSiteAccessAwareRoutes()

eZ\Bundle\EzPublishCoreBundle\Routing\DefaultRouter::setNonSiteAccessAwareRoutes | ( | array | $routes | ) |

Injects route names that are not supposed to be SiteAccess aware.

i.e. Routes pointing to asset generation (like assetic).

Parameters

  array | $routes |

Definition at line 52 of file DefaultRouter.php.

## ◆ setSiteAccess()

eZ\Bundle\EzPublishCoreBundle\Routing\DefaultRouter::setSiteAccess | ( | SiteAccess | $siteAccess = `null` | ) |

Implements eZ\Publish\Core\MVC\Symfony\SiteAccess\SiteAccessAware.

Definition at line 41 of file DefaultRouter.php.

References eZ\Bundle\EzPublishCoreBundle\Routing\DefaultRouter\$siteAccess.

## ◆ setSiteAccessRouter()

eZ\Bundle\EzPublishCoreBundle\Routing\DefaultRouter::setSiteAccessRouter | ( | SiteAccessRouterInterface | $siteAccessRouter | ) |

Parameters

  \eZ\Publish\Core\MVC\Symfony\SiteAccess\SiteAccessRouterInterface | $siteAccessRouter |

Definition at line 60 of file DefaultRouter.php.

References eZ\Bundle\EzPublishCoreBundle\Routing\DefaultRouter\$siteAccessRouter.

## Member Data Documentation

## ◆ $configResolver

eZ\Bundle\EzPublishCoreBundle\Routing\DefaultRouter::$configResolver
| protected

Definition at line 31 of file DefaultRouter.php.

Referenced by eZ\Bundle\EzPublishCoreBundle\Routing\DefaultRouter\setConfigResolver().

## ◆ $nonSiteAccessAwareRoutes

eZ\Bundle\EzPublishCoreBundle\Routing\DefaultRouter::$nonSiteAccessAwareRoutes = []
| protected

Definition at line 28 of file DefaultRouter.php.

## ◆ $siteAccess

eZ\Bundle\EzPublishCoreBundle\Routing\DefaultRouter::$siteAccess
| protected

Definition at line 26 of file DefaultRouter.php.

Referenced by eZ\Bundle\EzPublishCoreBundle\Routing\DefaultRouter\generate(), and eZ\Bundle\EzPublishCoreBundle\Routing\DefaultRouter\setSiteAccess().

## ◆ $siteAccessRouter

eZ\Bundle\EzPublishCoreBundle\Routing\DefaultRouter::$siteAccessRouter
| protected

Definition at line 34 of file DefaultRouter.php.

Referenced by eZ\Bundle\EzPublishCoreBundle\Routing\DefaultRouter\setSiteAccessRouter().

The documentation for this class was generated from the following file:

- DefaultRouter.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.