This is a simple data model I wrote for an app I'm currently working on (Bug tracker, full-stack social media app - updates to follow in the next few weeks).
I may be ripping Mana down from this account very soon as I've re-written the entire thing for my current project. Mana is ok but thee are parts I'm not proud of or keen on, plus it wasn't properly namespaced - mark II is better quality and I've been testing individual modules with PHPUnit so it's pretty tight! New project is going smoothly and looking nice, it's something I've wanted to do for a while so glad to be making progress on it! It's an app for devs, specifically -- so I'll be sharing more info soon right here on this profile.
But I really like this little module. I used it to write a command line application but it slots really well into a back-end framework with no problems at all. it's a neat little module so hopefully someone might find use for it, or just learn something from reading over the code.
Tried my best to stick to core OOP principles - small methods designed to accomplish very specific tasks.
It's written for MySQL/MariaDB and features the usual CRUD functionality, it also creates tables automatically - all you need to do is create a class that extends the DataModel, define your table and you're good to go!
I won't keep you here, the code is pretty well commented and anyone familiar with PHP/OOP will be able to get it working fairly quickly, so I'd only be re-hasing what I've already written.
Feel free to do as you please with it - throw your flames this-a-way if that's your bag but keep it clean, this is a child-friendly git!