

igorw wrote:As per the ticket:
Getting rid of the hard-coded 'includes' seems like a good idea. Not so sure about the class prefix, since we really want people to actually namespace their classes. If we want phpbb_mod_classname and /mods/classname.php it might be good to have it dynamic, but that's not been decided yet.
igorw wrote:add_loader seems like a bad idea to me, it adds complexity. A better approach here imo would be to just create a second separate class loader instance and call register() on that.
igorw wrote:In general YAGNI applies, it does not make sense to change the class loader before we know what the class names and paths of 3.1 MODs will look like. And that discussion probably belongs into a separate topic.
igorw wrote:If we want phpbb_mod_classname and /mods/classname.php it might be good to have it dynamic, but that's not been decided yet.


naderman wrote:In my opinion MODs should simply name their classes phpbb_<modname>_whatever. These files should be placed in the includes directory where all autoloaded classes reside.
bantu wrote:igorw wrote:If we want phpbb_mod_classname and /mods/classname.php it might be good to have it dynamic, but that's not been decided yet.
I don't think we should make an expection for the phpbb_mod_ prefix, but rather just call the directory "mod" instead of "mods". This is much more straight foreward.
igorw wrote:add_loader seems like a bad idea to me, it adds complexity. A better approach here imo would be to just create a second separate class loader instance and call register() on that.
Erik Frèrejean wrote:I'm not sure whether I like this, if you for example have 4 MODs installed that all use a different class loader you'll end up with 5 instances of the class loader. IMHO this clutters the code more than needed as the class loader can easily accommodate variations (different include path/class prefix).


Return to [3.1/Ascraeus] Merged RFCs
Users browsing this forum: Arty, DavidIQ, Pony99CA and 9 guests