Generator\Dumper\PhpGeneratorDumper (Component\Routing)

Symfony\Component\Routing\Generator\Dumper\PhpGeneratorDumper

class PhpGeneratorDumper extends GeneratorDumper

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

Methods

__construct(RouteCollection $routes)

Constructor.

from GeneratorDumper
RouteCollection getRoutes()

Gets the routes to dump.

from GeneratorDumper
string dump(array $options = array())

Dumps a set of routes to a PHP class.

Details

public __construct(RouteCollection $routes)

Constructor.

Parameters

RouteCollection $routes The RouteCollection to dump

public RouteCollection getRoutes()

Gets the routes to dump.

Return Value

RouteCollection A RouteCollection instance

public string dump(array $options = array())

Dumps a set of routes to a PHP class.

Available options:

  • class: The class name
  • base_class: The base class name

Parameters

array $options An array of options

Return Value

string A PHP class representing the generator class

© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.0/Symfony/Component/Routing/Generator/Dumper/PhpGeneratorDumper.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部