Exemplo n.º 1
0
 public function updateAction($id, $name, $age, $weight, $height)
 {
     // Retrieve the person we're looking for
     $person = Persons::findById($id);
     // Update the person's information
     $person->set('name', $name);
     $person->set('age', $age);
     $person->set('weight', $weight);
     $person->set('height', $height);
     // Save the person
     $person->save();
     // Store the new information for view rendering
     $this->view->person = $person;
     // Tell the view we're editing
     $this->view->action = 'editing';
     // Render the edit view
     $this->view->render('views/edit');
 }