News Feed
Sections




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

David Stockton's Blog:
Using local configuration files in Zend Framework
August 11, 2011 @ 09:10:33

David Stockton has a new post to his site looking at a handy tip those using the Zend Framework for their applications can use to simplify how they handle their settings - using local configuration files.

I've run into a common issue [in my Zend Framework development]. This issue is multiple developers each needing a slightly different configuration from each other. Inevitably this means that each developer needs to maintain their own changes to a common configuration file. This tutorial shows you how to make some minor modifications to your Zend Framework MVC application to allow developers to supply their own local.ini which is not checked into the repository and can override any settings they want while not having to worry about any of the problems listed above.

He walks through the changes you'll need to make - a simple update to the bootstrap that uses Zend_Config_Ini component with the "allowModifications" setting set to true. A check is then put in to see if there's a "local.ini" file in the configuration directory and, if so, load it and potentially override the application.ini settings. It's a very handy tip for those working in a shared code base not wanting to step on any toes.

0 comments voice your opinion now!
configuration file zendconfigini zendframework tutorial custom


blog comments powered by Disqus

Similar Posts

Andrew Podner: Using Stackato for PHP Applications in a Private PaaS

Developer.com: Build your own MVC Framework: Making Headway

Enrico Zimuel's Blog: XML to JSON in PHP: an odyssey

Matthew Weier O'Phinney: Apigility: Using RPC with HAL

Stoimen.com: Iterate over YouTube Channel with Zend_Gdata_YouTube


Community Events

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


example list podcast opinion part2 api community framework application series programming introduction laravel yii2 language php7 project interview composer symfony

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