Rudolph Gottesheim
Rudolph Gottesheim

Reputation: 1701

Custom Route Type in ZF2

I've got a custom route type:

class MyRoute implements Zend\Mvc\Router\Http\RouteInterface
{
    // ...
}

How do I register it with Zend\Mvc\Router\RoutePluginManager? I can't figure out which config key it uses.

Upvotes: 0

Views: 262

Answers (2)

Vinícius Fagundes
Vinícius Fagundes

Reputation: 2041

Another place you can check is in the class Zend\Mvc\Service\ModuleManagerFactory inside the zendframework/zend-mvc library.

This class instantiates the default module listeners.

Upvotes: 1

Crisp
Crisp

Reputation: 11447

The config key you're looking for is route_manager.

For reference, there's a handy table in the manual which maps managers, interfaces, method names and configuration keys -> http://framework.zend.com/manual/current/en/tutorials/config.advanced.html#configuration-mapping-table

Upvotes: 1

Related Questions