You can have properties for each model field and together with setters and getters arrange the access to those properties. But the drawback with that approach is that it gets tedious very fast. The more properties, the more tedious it gets. And I'm not talking about the model classes them selves, but the classes using those models.
So a controller would for example:
Code: Select all
class somecontroller {
public function saveUser(){
$model = $this->load()->model('user');
$model->name = $somevalue;
$model->email = $someothervalue;
/* etc etc */
$model->save();
}
}What are your strategies?