CodeIgniter Forums
What has happened to the libraries? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forum-28.html)
+--- Forum: CodeIgniter 4 Discussion (https://forum.codeigniter.com/forum-31.html)
+--- Thread: What has happened to the libraries? (/thread-65796.html)



What has happened to the libraries? - PaulD - 07-25-2016

Hi,

I don't mean to ask a silly question, but have been reading the CI4 documentation. Was thinking about testing out CI4 on an old domain name. But then I realised that the libraries have gone.

I know they are just classes, but I have got into the habit of super thin controllers and models, with most of the work being done in libraries.

Are libraries now just models?

I am sorry if this is a silly question.

Paul.


RE: What has happened to the libraries? - ciadmin - 07-25-2016

It's more like "models can be just classes", and they might be treated special (eg more easily found) if they are inside the models folder. A model *can* extend \CodeIgniter\Model, which provides a bunch of base functionality, but it doesn't have to.

Libraries & models are both loaded the same way ... $mything = new App\whereveriputit\MyWonderfulLibraryOrModel();

Undecided


RE: What has happened to the libraries? - kilishan - 07-25-2016

And as for where they've gone - most of them just haven't been created yet. Smile


RE: What has happened to the libraries? - ciadmin - 07-25-2016

Big caution about testing CI4 ... it is not feature complete yet!
I am converting the CI website as my testbed, and as I run into a not-yet-implemented feature, I take it on, so that I can advance my conversion/testing.
Hmmm - that strategy might work for you too Big Grin


RE: What has happened to the libraries? - PaulD - 07-25-2016

Thanks,

I am just so excited about the new features I was going to have a test run with it, I do understand you have just started phase 2, so perhaps I will hold off for a while longer. In fact I need to check my host actually offers PHP7 yet :-(

Thank you for your responses,

Best wishes,

Paul.