PHP Class eZ\Bundle\EzPublishCoreBundle\Routing\DefaultRouter

Inheritance: extends Symfony\Bundle\FrameworkBundle\Routing\Router, implements Symfony\Component\Routing\Matcher\RequestMatcherInterface, implements eZ\Publish\Core\MVC\Symfony\SiteAccess\SiteAccessAware
Mostra file Open project: ezsystems/ezpublish-kernel Class Usage Examples

Protected Properties

Property Type Description
$configResolver eZ\Publish\Core\MVC\ConfigResolverInterface
$nonSiteAccessAwareRoutes
$siteAccess eZ\Publish\Core\MVC\Symfony\SiteAccess
$siteAccessRouter eZ\Publish\Core\MVC\Symfony\SiteAccess\SiteAccessRouterInterface

Public Methods

Method Description
generate ( $name, $parameters = [], $referenceType = self::ABSOLUTE_PATH )
getContextBySimplifiedRequest ( SimplifiedRequest $simplifiedRequest ) : Symfony\Component\Routing\RequestContext Merges context from $simplifiedRequest into a clone of the current context.
matchRequest ( Request $request )
setConfigResolver ( eZ\Publish\Core\MVC\ConfigResolverInterface $configResolver )
setNonSiteAccessAwareRoutes ( array $routes ) Injects route names that are not supposed to be SiteAccess aware.
setSiteAccess ( SiteAccess $siteAccess = null )
setSiteAccessRouter ( eZ\Publish\Core\MVC\Symfony\SiteAccess\SiteAccessRouterInterface $siteAccessRouter )

Protected Methods

Method Description
isSiteAccessAwareRoute ( $routeName ) : boolean Checks if $routeName is a siteAccess aware route, and thus needs to have siteAccess URI prepended.

Method Details

generate() public method

public generate ( $name, $parameters = [], $referenceType = self::ABSOLUTE_PATH )

getContextBySimplifiedRequest() public method

Merges context from $simplifiedRequest into a clone of the current context.
public getContextBySimplifiedRequest ( SimplifiedRequest $simplifiedRequest ) : Symfony\Component\Routing\RequestContext
$simplifiedRequest eZ\Publish\Core\MVC\Symfony\Routing\SimplifiedRequest
return Symfony\Component\Routing\RequestContext

isSiteAccessAwareRoute() protected method

Will be used for link generation, only in the case of URI SiteAccess matching.
protected isSiteAccessAwareRoute ( $routeName ) : boolean
$routeName
return boolean

matchRequest() public method

public matchRequest ( Request $request )
$request Symfony\Component\HttpFoundation\Request

setConfigResolver() public method

public setConfigResolver ( eZ\Publish\Core\MVC\ConfigResolverInterface $configResolver )
$configResolver eZ\Publish\Core\MVC\ConfigResolverInterface

setNonSiteAccessAwareRoutes() public method

i.e. Routes pointing to asset generation (like assetic).
public setNonSiteAccessAwareRoutes ( array $routes )
$routes array

setSiteAccess() public method

public setSiteAccess ( SiteAccess $siteAccess = null )
$siteAccess eZ\Publish\Core\MVC\Symfony\SiteAccess

setSiteAccessRouter() public method

public setSiteAccessRouter ( eZ\Publish\Core\MVC\Symfony\SiteAccess\SiteAccessRouterInterface $siteAccessRouter )
$siteAccessRouter eZ\Publish\Core\MVC\Symfony\SiteAccess\SiteAccessRouterInterface

Property Details

$configResolver protected_oe property

protected ConfigResolverInterface,eZ\Publish\Core\MVC $configResolver
return eZ\Publish\Core\MVC\ConfigResolverInterface

$nonSiteAccessAwareRoutes protected_oe property

protected $nonSiteAccessAwareRoutes

$siteAccess protected_oe property

protected SiteAccess,eZ\Publish\Core\MVC\Symfony $siteAccess
return eZ\Publish\Core\MVC\Symfony\SiteAccess

$siteAccessRouter protected_oe property

protected SiteAccessRouterInterface,eZ\Publish\Core\MVC\Symfony\SiteAccess $siteAccessRouter
return eZ\Publish\Core\MVC\Symfony\SiteAccess\SiteAccessRouterInterface