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

Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
eZ\Publish\Core\MVC\Symfony\Routing\Generator Class Reference

Base class for eZ Publish Url generation. More...

Inheritance diagram for eZ\Publish\Core\MVC\Symfony\Routing\Generator:

## Public Member Functions
| setRequestContext (RequestContext $requestContext)
| setSiteAccessRouter (SiteAccessRouterInterface $siteAccessRouter)
| setSiteAccess (SiteAccess $siteAccess=null)
| setLogger (LoggerInterface $logger=null)
| generate ($urlResource, array $parameters, $referenceType=UrlGeneratorInterface::ABSOLUTE_PATH)
| Triggers URL generation for $urlResource and $parameters. More...
| doGenerate ($urlResource, array $parameters)
| Generates the URL from $urlResource and $parameters. More...

## Protected Member Functions
| generateAbsoluteUrl ($uri, RequestContext $requestContext)
| Generates an absolute URL from $uri and the request context. More...

## Protected Attributes
| $requestContext
| $siteAccessRouter
| $siteAccess
| $logger

## Private Member Functions
| getContextBySimplifiedRequest (SimplifiedRequest $simplifiedRequest)
| Merges context from $simplifiedRequest into a clone of the current context. More...

## Detailed Description

Base class for eZ Publish Url generation.

Definition at line 19 of file MVC/Symfony/Routing/Generator.php.

## Member Function Documentation

## ◆ doGenerate()

eZ\Publish\Core\MVC\Symfony\Routing\Generator::doGenerate | ( |  | $urlResource,
|  | array | $parameters
| ) |  |
| abstract

Generates the URL from $urlResource and $parameters.

Parameters

  mixed | $urlResource |
  array | $parameters |

Returns
  string

Reimplemented in eZ\Publish\Core\MVC\Symfony\Routing\Generator\UrlAliasGenerator.

Referenced by eZ\Publish\Core\MVC\Symfony\Routing\Generator\generate().

## ◆ generate()

eZ\Publish\Core\MVC\Symfony\Routing\Generator::generate | ( |  | $urlResource,
|  | array | $parameters,
|  |  | $referenceType = `UrlGeneratorInterface::ABSOLUTE_PATH`
| ) |  |

Triggers URL generation for $urlResource and $parameters.

Parameters

  mixed | $urlResource | Type can be anything, depending on the context. It's up to the router to pass the appropriate value to the implementor.
  array | $parameters | Arbitrary hash of parameters to generate a link. SiteAccess name can be provided as 'siteaccess' to generate a link to it (cross siteaccess link).
  int | $referenceType | The type of reference to be generated (one of the constants)

Returns
  string

Definition at line 75 of file MVC/Symfony/Routing/Generator.php.

References eZ\Publish\Core\MVC\Symfony\Routing\Generator\$requestContext, eZ\Publish\Core\MVC\Symfony\Routing\Generator\$siteAccess, eZ\Publish\Core\MVC\Symfony\Routing\Generator\doGenerate(), eZ\Publish\Core\MVC\Symfony\Routing\Generator\generateAbsoluteUrl(), and eZ\Publish\Core\MVC\Symfony\Routing\Generator\getContextBySimplifiedRequest().

## ◆ generateAbsoluteUrl()

eZ\Publish\Core\MVC\Symfony\Routing\Generator::generateAbsoluteUrl | ( |  | $uri,
|  | RequestContext | $requestContext
| ) |  |
| protected

Generates an absolute URL from $uri and the request context.

Parameters

  string | $uri |
  \Symfony\Component\Routing\RequestContext | $requestContext |

Returns
  string

Definition at line 126 of file MVC/Symfony/Routing/Generator.php.

References eZ\Publish\Core\MVC\Symfony\Routing\Generator\$requestContext.

Referenced by eZ\Publish\Core\MVC\Symfony\Routing\Generator\generate().

## ◆ getContextBySimplifiedRequest()

eZ\Publish\Core\MVC\Symfony\Routing\Generator::getContextBySimplifiedRequest | ( | SimplifiedRequest | $simplifiedRequest | ) |
| private

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

Parameters

  SimplifiedRequest | $simplifiedRequest |

Returns
  RequestContext

Definition at line 146 of file MVC/Symfony/Routing/Generator.php.

References eZ\Publish\Core\MVC\Symfony\Routing\Generator\$requestContext.

Referenced by eZ\Publish\Core\MVC\Symfony\Routing\Generator\generate().

## ◆ setLogger()

eZ\Publish\Core\MVC\Symfony\Routing\Generator::setLogger | ( | LoggerInterface | $logger = `null` | ) |

Parameters

  LoggerInterface | $logger |

Definition at line 60 of file MVC/Symfony/Routing/Generator.php.

References eZ\Publish\Core\MVC\Symfony\Routing\Generator\$logger.

## ◆ setRequestContext()

eZ\Publish\Core\MVC\Symfony\Routing\Generator::setRequestContext | ( | RequestContext | $requestContext | ) |

Parameters

  \Symfony\Component\Routing\RequestContext | $requestContext |

Definition at line 36 of file MVC/Symfony/Routing/Generator.php.

References eZ\Publish\Core\MVC\Symfony\Routing\Generator\$requestContext.

## ◆ setSiteAccess()

eZ\Publish\Core\MVC\Symfony\Routing\Generator::setSiteAccess | ( | SiteAccess | $siteAccess = `null` | ) |

Parameters

  \eZ\Publish\Core\MVC\Symfony\SiteAccess | $siteAccess |

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

Definition at line 52 of file MVC/Symfony/Routing/Generator.php.

References eZ\Publish\Core\MVC\Symfony\Routing\Generator\$siteAccess.

## ◆ setSiteAccessRouter()

eZ\Publish\Core\MVC\Symfony\Routing\Generator::setSiteAccessRouter | ( | SiteAccessRouterInterface | $siteAccessRouter | ) |

Parameters

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

Definition at line 44 of file MVC/Symfony/Routing/Generator.php.

References eZ\Publish\Core\MVC\Symfony\Routing\Generator\$siteAccessRouter.

## Member Data Documentation

## ◆ $logger

eZ\Publish\Core\MVC\Symfony\Routing\Generator::$logger
| protected

Definition at line 31 of file MVC/Symfony/Routing/Generator.php.

Referenced by eZ\Publish\Core\MVC\Symfony\Routing\Generator\setLogger().

## ◆ $requestContext

eZ\Publish\Core\MVC\Symfony\Routing\Generator::$requestContext
| protected

Definition at line 22 of file MVC/Symfony/Routing/Generator.php.

Referenced by eZ\Publish\Core\MVC\Symfony\Routing\Generator\generate(), eZ\Publish\Core\MVC\Symfony\Routing\Generator\generateAbsoluteUrl(), eZ\Publish\Core\MVC\Symfony\Routing\Generator\getContextBySimplifiedRequest(), and eZ\Publish\Core\MVC\Symfony\Routing\Generator\setRequestContext().

## ◆ $siteAccess

eZ\Publish\Core\MVC\Symfony\Routing\Generator::$siteAccess
| protected

Definition at line 28 of file MVC/Symfony/Routing/Generator.php.

Referenced by eZ\Publish\Core\MVC\Symfony\Routing\Generator\UrlAliasGenerator\createPathString(), eZ\Publish\Core\MVC\Symfony\Routing\Generator\UrlAliasGenerator\doGenerate(), eZ\Publish\Core\MVC\Symfony\Routing\Generator\generate(), and eZ\Publish\Core\MVC\Symfony\Routing\Generator\setSiteAccess().

## ◆ $siteAccessRouter

eZ\Publish\Core\MVC\Symfony\Routing\Generator::$siteAccessRouter
| protected

Definition at line 25 of file MVC/Symfony/Routing/Generator.php.

Referenced by eZ\Publish\Core\MVC\Symfony\Routing\Generator\setSiteAccessRouter().

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

- MVC/Symfony/Routing/Generator.php

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