Places to store basic data
Posted
by
Ella
on Programmers
See other posts from Programmers
or by Ella
Published on 2012-02-25T23:19:14Z
Indexed on
2012/03/27
5:39 UTC
Read the original article
Hit count: 254
I am using PHP.
I'm building a fully modular CMS, which is destined for the public. Some people might view this as a framework, but I intend to write a set of extensions for it, extensions that will make it a CMS :P
Because it's completely modular I have a problem figuring out how to load extensions.
Practically I need to get the list of active extensions, so I can load them inside my base class. I load them by reading some file headers, which contain a "dependency" field. That field decides the order in which I have to instantiate the objects.
The problem is that when the CMS starts I have no database interface, because that's an extension too, so I can't store the active extensions list in the database :)
You might ask how are extensions activated in the first place. Well - in the administration interface, which is an extension as well (obviously on first install of the CMS there will be some extensions active by default).
Could writing that list inside a text file be a solution? The problem is that a lot of hosts are not very nice with scripts when they write files. And since this CMS is public I might have a problem here?
© Programmers or respective owner