Configuring modules in Zend Framework

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Quessir
Forum Newbie
Posts: 4
Joined: Tue Jul 31, 2007 10:12 am
Location: Almaty, Kazakhstan

Configuring modules in Zend Framework

Post 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?
Post Reply