|
-
May 30th, 2007, 05:16 PM
#1
[RESOLVED] How can this be done?
I'm coding my CMS in PHP4, I will release it under GPL license as son as I think the core API is stable. Right now I change it allot in the search for a better architecture.
I need an OOP way to be able to load modules at runtime. For example:
PHP Code:
class CMS { function load_module($module_file) { // loaded module can now be used by CMS class or // by any previously loaded module } }
this way i can do:
PHP Code:
$cms = new CMS; $cms->load_module("config.php"); // load first module, config $cms->load_module("database.php"); // load second module, database, it has acces to cms->config module some how $cms->load_module("templating.php"); // load third module, templating, which can use config and database modules // etc...
I've been reading about Drupal architecture here (make sure to read the comments also), but Drupal is what I call, function oriented lol. It's strictly procedural (still works very well).
What I really needed is a true OOP way to do it, something like the code example above. I know about aggregate() for PHP4 and runkit for PHP5 but they are experimental and runkit doesn't even bundles with PHP. So those are a no-go for a OOS CMS (Open Source Content Management System).
Any ideas?
Thanks in advance for your attention.
Last edited by bubu; May 30th, 2007 at 05:19 PM.
All consequences are eternal in some way.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|