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
Aug 11, 2011 @ 14: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.

tagged: configuration file zendconfigini zendframework tutorial custom

Link:

Nick Halstead's Blog:
Zend Framework RC1 and Zend ACL usage
May 31, 2007 @ 12:52:00

Nick Halstead takes a look at another aspect of the Zend Framework in his latest blog post - the ACL component in the most recent release, Zend Framework RC1.

Yesterday RC1 of Zend Framework was released. I have been working away using it for several months and I have tried to give back small snippets of code as I went along. I had to do some work on my class that extends the Zend ACL and it reminded me how I like to approach coding as a whole.

He goes on to look at what the Zend Framework access control functionality is and how he plans on using it. He follows this with a few code snippets that, among other things, show how the Zend_Config_Ini component could be used to maintain the access list.

tagged: accesscontrol zendacl zendframework zendconfigini accesscontrol zendacl zendframework zendconfigini

Link:

Nick Halstead's Blog:
Zend Framework RC1 and Zend ACL usage
May 31, 2007 @ 12:52:00

Nick Halstead takes a look at another aspect of the Zend Framework in his latest blog post - the ACL component in the most recent release, Zend Framework RC1.

Yesterday RC1 of Zend Framework was released. I have been working away using it for several months and I have tried to give back small snippets of code as I went along. I had to do some work on my class that extends the Zend ACL and it reminded me how I like to approach coding as a whole.

He goes on to look at what the Zend Framework access control functionality is and how he plans on using it. He follows this with a few code snippets that, among other things, show how the Zend_Config_Ini component could be used to maintain the access list.

tagged: accesscontrol zendacl zendframework zendconfigini accesscontrol zendacl zendframework zendconfigini

Link:


Trending Topics: