[ Index ]

PHP Cross Reference of phpBB-3.3.7-deutsch

title

Body

[close]

/vendor/symfony/routing/Generator/ -> UrlGenerator.php (summary)

(no description)

File Size: 326 lines (14 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

UrlGenerator:: (8 methods):
  __construct()
  setContext()
  getContext()
  setStrictRequirements()
  isStrictRequirements()
  generate()
  doGenerate()
  getRelativePath()


Class: UrlGenerator  - X-Ref

UrlGenerator can generate a URL or a path for any route in the RouteCollection
based on the passed parameters.

__construct(RouteCollection $routes, RequestContext $context, LoggerInterface $logger = null)   X-Ref
No description

setContext(RequestContext $context)   X-Ref
{@inheritdoc}


getContext()   X-Ref
{@inheritdoc}


setStrictRequirements($enabled)   X-Ref
{@inheritdoc}


isStrictRequirements()   X-Ref
{@inheritdoc}


generate($name, $parameters = [], $referenceType = self::ABSOLUTE_PATH)   X-Ref
{@inheritdoc}


doGenerate($variables, $defaults, $requirements, $tokens, $parameters, $name, $referenceType, $hostTokens, array $requiredSchemes = [])   X-Ref

return: string|null

getRelativePath($basePath, $targetPath)   X-Ref
Returns the target path as relative reference from the base path.

Only the URIs path component (no schema, host etc.) is relevant and must be given, starting with a slash.
Both paths must be absolute and not contain relative parts.
Relative URLs from one resource to another are useful when generating self-contained downloadable document archives.
Furthermore, they can be used to reduce the link size in documents.

Example target paths, given a base path of "/a/b/c/d":
- "/a/b/c/d"     -> ""
- "/a/b/c/"      -> "./"
- "/a/b/"        -> "../"
- "/a/b/c/other" -> "other"
- "/a/x/y"       -> "../../x/y"

param: string $basePath   The base path
param: string $targetPath The target path
return: string The relative target path



Generated: Thu Mar 24 21:31:15 2022 Cross-referenced by PHPXref 0.7.1