class PhpMatcherDumper extends CompiledUrlMatcherDumper

deprecated since Symfony 4.2, use CompiledUrlMatcherDumper instead.

PhpMatcherDumper creates a PHP class able to match URLs for a given set of routes.

Methods

__construct(RouteCollection $routes)

No description

getRoutes()

Gets the routes to dump.

string
dump(array $options = [])

Dumps a set of routes to a PHP class.

array
getCompiledRoutes(bool $forDump = false)

Generates the arrays for CompiledUrlMatcher's constructor.

static string
export($value)

No description

Details

in MatcherDumper at line 25
__construct(RouteCollection $routes)

Parameters

RouteCollection $routes

in MatcherDumper at line 33
RouteCollection getRoutes()

Gets the routes to dump.

Return Value

RouteCollection A RouteCollection instance

at line 40
string dump(array $options = [])

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 Executable code

addExpressionLanguageProvider(ExpressionFunctionProviderInterface $provider)

array getCompiledRoutes(bool $forDump = false)

Generates the arrays for CompiledUrlMatcher's constructor.

Parameters

bool $forDump

Return Value

array

static string export($value)

Parameters

$value

Return Value

string