CodeIgniter Forums

Full Version: What has happened to the libraries?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
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
And as for where they've gone - most of them just haven't been created yet. Smile
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
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.