PHP snippets
-
Building Helpers Objects using a HelperBroker
03 Feb 2012Helper Objects are awesome, they enable you to write little peaces of code (classes) that you can re-use at any time in you Application. Before we can build some helpers we first need to write a HelperBroker that manages the Helper Objects. A HelperBroker class loads the helpers at runtime and proxy their functionality to it. This version of the HelperBroker is made as a singleton and caches the Helpers Objects after use, so that the next time the Helper Object is called the HelperBroker loads it from memory saving resources and speeding up you application.... read more
-
Coding a Php Config Object
29 Jan 2012A php config object enables you to extract all your configurations from your php and put it in a separate config.ini file. No more configuration settings in your php files!! Doesn't that sound nice?... read more
