0

I'm attempting to override the routes provided by ZfcUser using akrabat's method, however it doesn't seem to have any effect. I'm starting by rebasing the routes from /user to /users but will want to add other routes later on (should be simple if I can get this working).

My DI configuration:

return [ 
    'di' => [
        'instance' => [
            'Zend\Mvc\Router\RouteStack' => [
                'parameters' => [
                    'routes' => [ 
                        'zfcuser' => [
                            'options' => [
                                'route' => '/users'
                            ]   
                        ]   
                    ]   
                ]   
            ]   
        ]   
    ]   
];

Am I making an obvious mistake or has the configuration structure for this changed since this blogpost?

Ross
  • 46,186
  • 39
  • 120
  • 173
  • This article of acrabat is pretty old (23rd February 2012). Di has changed a lot since then and became less important. I don't think it is possible to solve it this way anylonger (but I'm not sure and I don't know how else to solve it). – Daniel M Sep 25 '12 at 09:21

1 Answers1

1

You'd overwrite configuration from within your own modules.

'router' => array(
    'routes' => array(
         'zfcuser' => array(
              //...
         )
    )
)

Though if i'm correct the full DI Path should still work... It's important, too, that your module loads AFTER the zfcUser-Module. So within your application.config.php be sure that your modules Namespace is listed after zfcUser. Since the arrays simply get overwritten depending on load time ^^

Sam
  • 16,435
  • 6
  • 55
  • 89