I've written a custom Part
class (MyNamespace\Mvc\Router\Http\Part
), that shall now be used instead instead of the Zend\Mvc\Router\Http\Part
. How to load it to the list of the invokables of the Zend\Mvc\Router\RoutePluginManager
?
--
EDIT:
Just tried it with
namespace Application;
use Zend\Mvc\MvcEvent;
class Module {
...
public function onBootstrap(MvcEvent $mvcEvent) {
...
$routePluginManager = $mvcEvent->getRouter()->getRoutePluginManager();
$routePluginManager->setInvokableClass('part', 'MyWorkspace\Mvc\Router\Http\Part');
...
}
...
}
but it's not working -- the standard Zend class is still used.