query() public method

public query ( $postdata = null )
Beispiel #1
0
     list($data, $totalCount) = $logs->get($_GET["limit"], $_GET["index"], $_GET["search"]);
     httpResponse($data, $totalCount);
     break;
 case validateRoute('GET', 'bonus-shop'):
     $bonusShop = new BonusShop($db, $user);
     httpResponse($bonusShop->getShopItems());
     break;
 case validateRoute('POST', 'bonus-shop/\\d+'):
     $mailbox = new Mailbox($db, $user);
     $bonusShop = new BonusShop($db, $user, $mailbox);
     $bonusShop->buy((int) $params[1], $postdata);
     httpResponse();
     break;
 case validateRoute('GET', 'invites'):
     $invite = new Invite($db, $user);
     httpResponse($invite->query());
     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);