update() public method

public update ( $id, $postdata )
Beispiel #1
0
     break;
 case validateRoute('GET', 'friends'):
     $friends = new Friends($db, $user);
     httpResponse($friends->query());
     break;
 case validateRoute('POST', 'friends'):
     $friends = new Friends($db, $user);
     httpResponse($friends->create($postdata));
     break;
 case validateRoute('DELETE', 'friends/\\d+'):
     $friends = new Friends($db, $user);
     httpResponse($friends->delete((int) $params[1]));
     break;
 case validateRoute('PATCH', 'friends/\\d+'):
     $friends = new Friends($db, $user);
     httpResponse($friends->update((int) $params[1]), $postdata);
     break;
 case validateRoute('GET', 'blocked'):
     $blocked = new Blocked($db, $user);
     httpResponse($blocked->query());
     break;
 case validateRoute('POST', 'blocked'):
     $blocked = new Blocked($db, $user);
     httpResponse($blocked->create($postdata));
     break;
 case validateRoute('DELETE', 'blocked/\\d+'):
     $blocked = new Blocked($db, $user);
     httpResponse($blocked->delete((int) $params[1]));
     break;
 case validateRoute('GET', 'bookmarks'):
     $bookmarks = new Bookmarks($db, $user);