create() 공개 메소드

public create ( $postdata )
예제 #1
0
     break;
 case validateRoute('POST', 'invites'):
     $invite = new Invite($db, $user);
     httpResponse($invite->create());
     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);