Model to interpret data

Valhalla

Well-known member
Should I use a Model to interpret (manipulate) data in addition to fetching it, or should I fetch from the Model, return it, and manipulate elsewhere?
 
Models can often be used to manipulate and prepare data too.

Depends exactly on the scenario, but it is done in XenForo in many places. Whether it be unserialising data before its sent to a template or setting additional flags or checking and adjusting the data based on permissions etc.
 
Back
Top Bottom