Documentation

PhpGeneratorDumper extends GeneratorDumper
in package

PhpGeneratorDumper creates a PHP class able to generate URLs for a given set of routes.

Tags
author

Fabien Potencier fabien@symfony.com

author

Tobias Schultze http://tobion.de

Table of Contents

$routes  : mixed
__construct()  : mixed
dump()  : string
Dumps a set of routes to a PHP class.
getRoutes()  : RouteCollection
Gets the routes to dump.
generateDeclaredRoutes()  : string
Generates PHP code representing an array of defined routes together with the routes properties (e.g. requirements).
generateGenerateMethod()  : string
Generates PHP code representing the `generate` method that implements the UrlGeneratorInterface.

Properties

Methods

dump()

Dumps a set of routes to a PHP class.

public dump([array<string|int, mixed> $options = [] ]) : string

Available options:

  • class: The class name
  • base_class: The base class name
Parameters
$options : array<string|int, mixed> = []

An array of options

Return values
string

A PHP class representing the generator class

generateDeclaredRoutes()

Generates PHP code representing an array of defined routes together with the routes properties (e.g. requirements).

private generateDeclaredRoutes() : string
Return values
string

PHP code

generateGenerateMethod()

Generates PHP code representing the `generate` method that implements the UrlGeneratorInterface.

private generateGenerateMethod() : string
Return values
string

PHP code

Search results