Is there a way to automatically/dynamically set all the attributes for a datamapper object instead of assigning them one for one?
So my form field names are exactly the same as the attributes from the datamapper model.
So is there a shorter way to do this:
function add() {
if( $this->input->post('client-add')) {
$c = new Client();
$c->name = $this->input->post('name');
$c->email = $this->input->post('email');
// and so on for about 20 more properties
$c->save();
}}