I decided it was time to continue working on my CMS again and am working on finishing up what was missing, and re-working a few tasks.
I have a component layer, which basically handles all the content tasks. Think Joomla for a second, if your familiar with it. Basically, I check if any component is set, and require its file if so. If the component has auto_start defined as true, and it is a class, the CMS will automatically call it.
It used to pass about 6 objects to the constructor, the database abs, config, core functions obj, user obj, xml parser / cacher, and plugin object.
I do this to prevent the need to global vars, but I dont like so many vars passed. So, I decided to trim this down.
Before calling the component file, I packaged all vars into an array...
Now I just pass this array to the constructor so its one var to deal with instead of setting and passing 6 or 7.
Now my question, is wrapping an object into an array going to really hurt performance? So far, the CMS is fairly large scale, but runs extremely fast. Very few queries are executed.. infact, before the plugin layer, no queries were executed if there was a cached page to load ( cache also has option to make CMS work as flat file, stored as XML docs ).
I want to keep the CMS running fast, and I didnt think an array with 6 or 7 keys would do much to performance, but wasnt sure. I als wasnt sure if writing ...