Overview

Namespaces

  • ApiBundle
    • DataFixtures
      • Faker
        • Provider
    • DependencyInjection
    • Doctrine
      • DBAL
        • Type
      • ORM
        • Filter
          • User
    • Entity
    • EventListener
      • Doctrine
    • Manager
    • Utils
  • FrontBundle
    • Bundle
      • UserBundle
    • Client
      • Exception
    • Controller
    • DependencyInjection
    • Form
      • DataTransformer
      • Type
    • Menu
    • Security
      • Http
        • Authentication
    • Services
      • Http
    • Twig
    • Utils

Classes

  • RequestBuilder
  • UrlBuilder
  • Overview
  • Namespace
  • Class

Class UrlBuilder

Namespace: FrontBundle\Services\Http
Author: Théo FIDRY theo.fidry@gmail.com
Located at FrontBundle/Services/Http/UrlBuilder.php
Methods summary
public
# __construct( Symfony\Component\Routing\RouterInterface $router )
public string
# buildUrl( string $baseUrl, string|null $url = null, array $parameters = [] )

Expands a URI template and inherit from the base URL if it's relative.

Expands a URI template and inherit from the base URL if it's relative.

Parameters

$baseUrl
Base URL to which will be applied the URI.
$url

URL or an array of the URI template to expand followed by a hash of template varnames.

$parameters

Route name parameters. If $url parameter passed is not a route name, this parameter is ignored.

Returns

string
URL

Throws

Symfony\Component\Routing\Exception\RouteNotFoundException
If the named route doesn't exist
Symfony\Component\Routing\Exception\MissingMandatoryParametersException
When some parameters are missing that are mandatory for the route
Symfony\Component\Routing\Exception\InvalidParameterException

When a parameter value for a placeholder is not correct because it does not match the requirement

API documentation generated by ApiGen