Example #1
0
 protected function create()
 {
     $params = arrayKeysSnakeToCamel($_POST['user']);
     $user = new User();
     $user->fromArray($params);
     $user->save();
     $this->addFlash("success", "registered");
     redirectTo("/");
 }
Example #2
0
 protected function getAllowedKeysForEdit()
 {
     $params = arrayKeysSnakeToCamel($_POST['note']);
     return array_intersect_key($params, array_flip(array('Title', 'Deadline', 'Description', 'State')));
 }