Stikki Posted January 17, 2015 Share Posted January 17, 2015 Howdy, Like topic states, is this how bad idea in general? I'v seen people ship own classes with modules, but didn't see people to extend modules to other modules, why? Is this because of bad practice? After all, modules are being autoloaded by system on demand, therefore classes are being available, and as far i saw, you can't install module that has dependency to other module, if parent module ain't existing. I am just asking if this is bad PW coding in general or just something no one really done before? Cheers Link to comment Share on other sites More sharing options...
kongondo Posted January 17, 2015 Share Posted January 17, 2015 Are you talking about people extending other custom modules other than core? There is nothing wrong with extending other modules if it suits your needs. Why reinvent the wheel? Of course, if your module is extending another, your module code needs to make checks whether the extended module is installed or not and what to do in such cases, etc. If referring to custom modules extending others, there are a couple of examples here, I can't find them all but MigratorWordpress extending MigratorAbstract comes to mind. Btw, autoloaded and loaded on demand are two different things 2 Link to comment Share on other sites More sharing options...
Stikki Posted January 18, 2015 Author Share Posted January 18, 2015 Thanks for the answer kongondo, I mean that module classes are autoloaded and modules are loaded on demand (memory), yeah got that part. Cheers for answer, was just wondering since didn't see this anywhere. Link to comment Share on other sites More sharing options...
Recommended Posts