Page 1 of 1

Configuring modules in Zend Framework

Posted: Thu Aug 02, 2007 5:43 am
by Quessir
Hi, all.

I'm trying to add module to my router.

Code: Select all

$router->addRoute('user', new Zend_Controller_Router_Route_Module('user/:username/', array('controller' => ':controller', 'action' => ':action')));
I need to load from url http://example.com/user/username/profile

module: user, then goes value of username, controller: profile.

But smth wrong with Zend_Controller_Router_Route_Module class. They're (ZF team) changed this class in release version. So, I got exception

Fatal error: Argument 1 passed to Zend_Controller_Router_Route_Module::__construct() must be an array.

There are no examples on using this class in manual.

Could anybody tell me the right way for doing this?