當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Requests::getMyRequests方法代碼示例

本文整理匯總了PHP中Requests::getMyRequests方法的典型用法代碼示例。如果您正苦於以下問題:PHP Requests::getMyRequests方法的具體用法?PHP Requests::getMyRequests怎麽用?PHP Requests::getMyRequests使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Requests的用法示例。


在下文中一共展示了Requests::getMyRequests方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: validateRoute

 case validateRoute('GET', 'requests'):
     $requests = new Requests($db, $user);
     list($requests, $total) = $requests->query((int) $_GET["index"], (int) $_GET["limit"], $_GET["sort"], $_GET["order"], $_GET["searchParams"]);
     httpResponse($requests, $total);
     break;
 case validateRoute('GET', 'requests/\\d+'):
     $requests = new Requests($db, $user);
     $movieData = new MovieData($db);
     $requestResponse = $requests->get($params[1]);
     $requestVotes = $requests->getVotes($params[1]);
     $movieDataResponse = $movieData->getData($requestResponse["imdbid"]);
     httpResponse(array("request" => $requestResponse, "votes" => $requestVotes, "movieData" => $movieDataResponse));
     break;
 case validateRoute('GET', 'requests/my'):
     $requests = new Requests($db, $user);
     httpResponse($requests->getMyRequests());
     break;
 case validateRoute('POST', 'requests'):
     $logs = new Logs($db, $user);
     $requests = new Requests($db, $user, $logs);
     httpResponse($requests->createOrUpdate($postdata));
     break;
 case validateRoute('PATCH', 'requests/\\d+'):
     $requests = new Requests($db, $user);
     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"]));
開發者ID:lordgabber,項目名稱:rartracker,代碼行數:31,代碼來源:api-v1.php


注:本文中的Requests::getMyRequests方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。