Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHPImpact Blog:
Zend Framework: Encapsulating routes into modules
Aug 04, 2008 @ 18:47:35

On the PHP::Impact blog, Federico Cargnelutti has another helpful tip to use in Zend Framework applications - encapsulating routes into modules.

You can encapsulate routes into modules by splitting the routes into different files and extending the Zend_Controller_Router_Rewrite class. But, what if you want to use the Redirector helper to set a URL based on a registered route?

His method creates the routing instance and overwrites the default getRoute method with a custom one in the extending class.

tagged: zendframework encapsulating route module override custom getroute

Link:


Trending Topics: