![]() |
Extend by MY-prefix in modular extensions hmvc - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Extend by MY-prefix in modular extensions hmvc (/showthread.php?tid=34673) |
Extend by MY-prefix in modular extensions hmvc - El Forum - 10-06-2010 [eluser]mvdg27[/eluser] Hi guys, I've got a question about modular extension hmvc, regarding extending libraries by the 'MY'-prefix. I've been fiddling around with it for a bit, but so far I haven't achieved what I was hoping to achieve. Ok, my idea was this: In codeigniter you can easily extend core classes by adding the MY-prefix for a class (= if I place MY_Email in the application library folder, the Core email class get's automatically extended and is available as $email->) Now I was hoping I could do something similar with modular extensions, but then for extending my application library classes from the modules. Consider the following structure: Code: /application/libraries/Test.php -> Just a normal library class in application libraries folder Now if I would load the Test library in module1, I would automatically get the extended class and if I would load the Test library in module2 (which doesn't contain a MY_Test.php library) I would get the normal Test-library. First question: Is this even possible with the current code? As far as I have seen it isn't. Second question: would this be a useful feature? Does it sound like complete non-sense? ![]() Third question: I'm happy to do some work on this, but I would need some pointers on where to start with this. Cheers, Michiel |