News Feed
Sections




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

Rob Allen's Blog:
Overriding module configuration in ZF2
February 23, 2012 @ 09:11:01

In a quick new post to his blog, Rob Allen shows how you can override a module's configuration in a Zend Framework 2 application. In his example, he uses the "User" module and overrides two of the "magic paths" it creates.

Let's say that you install the ZF-Common's User module. By default, it sets up its routes under the /user path segment. [...] This config section will create the routes /user and through the magic of child_routes, also create /user/login and other required routes. If you don't want /user and would prefer /member, then it's easy enough to change. Just add a new config file to the project's config/autoload folder.

Code for the configuration files is included with the update to the "ZendMvcRouterRouteStack" to change the ZF-Common User module's setup to point to "/member" instead of "/user" when routed. You can find out more about the module system in ZF2 in the latest version of the manual.

0 comments voice your opinion now!
module zendframework2 configuration override


blog comments powered by Disqus

Similar Posts

Nick Halstead's Blog: Zend Framework and fav.or.it

PHPImpact Blog: TDD with Symfony: The first test always fails

Padraic Brady's Blog: An Example Zend Framework Blog - Part 5: Models w/Zend_Db & an Admin Module

Paul Jones: Aura: More Decoupled Than Symfony 2 and Zend Framework 2

Kevin Schroeder's Blog: A little more advanced ZF2 EventManager usage


Community Events





Don't see your event here?
Let us know!


zendserver install podcast api introduction interview series unittest opinion tips framework library package community symfony release deployment language laravel update

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework