I have just added a PHP port of Martin Laine’s Application Constants Mach-II Coldfusion plugin to my new code section. It allows you to set application constants for multiple environments (development, staging, production etc.) in an XML configuration file, these constants are then read into the Mach-II properties.
I’ve being threatening to clean this port up and give this to Martin to release on his site for months now but hadn’t got around to it.
So today I spent a couple of hours re-writing it from scratch to bring it inline with the latest version of Martins. View the Application Constants Mach-II PHP code page for the download and instructions on it’s implementation.
As a little side note I hope that the code section of my site will allow me to release other little useful things like this I have kicking around. I’ve got at least one more Mach-II PHP plugin that I’m going to try and tidy up and release sometime soon.