Over the last few posts, I’ve covered topics ranging from creating interfaces to base classes and how to implement and inherit from both. One outstanding issue with the approach that this has covered thus far is that it didn’t take into account any type of file organization.
Anyone who has worked with any project of any size knows just how important having a clear organizational structure can be.
Later versions of PHP have feature of namespaces which can help us to further organize the code, but if you’re having to work with an old version, you don’t have that luxury. That’s no excuse for not properly organizing your files, though. You can still mimic what the namespace organization may look like.
So in this final post, I wanted to cover the approach that I normally take when organizing a plugin like the one we’ve been building.