It’s not often that the works of Friedrich Nietzsche and Kierkegaard spring to mind in the non-philsophical PHP coding world. However whilst working on the latest set of feature updates for our content management system, Miromanager2.0, I found the need to be looking to see if smoothing exists before attempting to use it.
Part of Miromedia’s next release version of the new CMS will be the ability to easily (for the developers at least) create client-specific customisations that sit outside the core code. Such things include modules and HTML output relating to a certain industry sector that would not necessarily apply to other customers.
In order for use to achieve this we needed a customisation model that would site alongide the base code but would not be affected by future release of the base code. So, a new directory strucutre and mirroring of customised objects has been adopted making use of: is_dir(), is_file() and function_exists(). These being used to determine if customisations exist for a particular PHP object and if function overrides exist. In this way the base code will only execute customisations where they have been created.
…the question now remains if I can call a similar function call passing myself to find out if I truly exist. As yet I have been unable to find such a method either in the existing PHP manual or future upgrades however if I do find one and call it and the call comes back false will I explode in a puff of existential logic?