Welcome Guest, Not a member yet? Register   Sign In
Models with parent::query not objects
#11

With all of the relational abstractions, when you get a result set from a database, the columns are automatically mapped to properties of the result set rows, be those provided as objects or as arrays. CI's <odel adds functionality based on the common practices or CI developers ... most of the CI3 developers ended up building their own base model, with methods convenienent to the way they wante to code, and those kinds of things are the methods you see in CI4' Model.

Method chaining is a programming style decision, which makes sense to us for readability and flexibility. We use it in a number of places in the framework, not just the model. You just need to make sure there are some "terminus" methods which return the target, eg a result set.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB