delete() public method

public delete ( $id, $postdata = null )
Ejemplo n.º 1
0
     break;
 case validateRoute('DELETE', 'invites/\\d+'):
     $invite = new Invite($db, $user);
     httpResponse($invite->delete((int) $params[1]));
     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);