PHP Class Symfony\Bundle\FrameworkBundle\Templating\Helper\RouterHelper

Author: Fabien Potencier ([email protected])
Inheritance: extends Symfony\Component\Templating\Helper\Helper
Afficher le fichier Open project: pmjones/php-framework-benchmarks Class Usage Examples

Protected Properties

Свойство Type Description
$generator

Méthodes publiques

Méthode Description
__construct ( Symfony\Component\Routing\Generator\UrlGeneratorInterface $router ) Constructor.
generate ( string $name, array $parameters = [], boolean $absolute = false ) : string Generates a URL from the given parameters.
getName ( ) : string Returns the canonical name of this helper.

Method Details

__construct() public méthode

Constructor.
public __construct ( Symfony\Component\Routing\Generator\UrlGeneratorInterface $router )
$router Symfony\Component\Routing\Generator\UrlGeneratorInterface A Router instance

generate() public méthode

Generates a URL from the given parameters.
public generate ( string $name, array $parameters = [], boolean $absolute = false ) : string
$name string The name of the route
$parameters array An array of parameters
$absolute boolean Whether to generate an absolute URL
Résultat string The generated URL

getName() public méthode

Returns the canonical name of this helper.
public getName ( ) : string
Résultat string The canonical name

Property Details

$generator protected_oe property

protected $generator