query() public method

public query ( $location, $limit = 10, $index )
Ejemplo n.º 1
0
     httpResponse($requests->createOrUpdate($postdata, (int) $params[1]));
     break;
 case validateRoute('DELETE', 'requests/\\d+'):
     $logs = new Logs($db, $user);
     $mailbox = new Mailbox($db, $user);
     $requests = new Requests($db, $user, $logs, $mailbox);
     httpResponse($requests->delete($params[1], $_GET["reason"]));
     break;
 case validateRoute('POST', 'requests/\\d+/votes'):
     $requests = new Requests($db, $user);
     $response = $requests->vote($params[1], (int) $postdata["reward"]);
     httpResponse($response);
     break;
 case validateRoute('GET', 'mailbox'):
     $mailbox = new Mailbox($db, $user);
     list($result, $totalCount) = $mailbox->query((int) $_GET["location"] ?: 0, (int) $_GET["limit"] ?: 10, (int) $_GET["index"] ?: 0);
     httpResponse($result, $totalCount);
     break;
 case validateRoute('PATCH', 'mailbox/\\d+'):
     $mailbox = new Mailbox($db, $user);
     httpResponse($mailbox->update((int) $params[1], $postdata));
     break;
 case validateRoute('POST', 'mailbox'):
     $mailbox = new Mailbox($db, $user);
     httpResponse($mailbox->create($postdata));
     break;
 case validateRoute('DELETE', 'mailbox/\\d+'):
     $mailbox = new Mailbox($db, $user);
     httpResponse($mailbox->delete((int) $params[1]));
     break;
 case validateRoute('GET', 'moviedata/\\d+'):