• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Model to interpret data

Valhalla

Well-known member
#1
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?
 

Chris D

XenForo developer
Staff member
#2
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.