Closed panique closed 8 years ago
I personally prefer the idea/method 2, I like the object oriented style.
Is there any progress on this? I also like the second version.
About the method, statical method seems more preferred & popular. The interface is simple, and no need to function () use ($obj) {$obj->method();}
INFO: This feature will come with MINI3, built on top of slim3, with full namespaces and multiple models :)
@panique hope to see mini3 soon :) 👍
hey, please find this feature now in MINI3 :) https://github.com/panique/mini3
Currently the model is just one class in one file. Totally okay for the main purpose of this script. But this is for sure not cool when your model gets bigger. Possible idea:
UserModel::getUserById(17)
everywhere in your app.$model->getAllSongs();
would get another level, like$model->SongModel->getAllSongs();