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


PHP Reports::create方法代碼示例

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


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

示例1: LoginAttempts

     $loginAttempts = new LoginAttempts($db, $user);
     httpResponse($loginAttempts->delete((int) $params[1]));
     break;
 case validateRoute('GET', 'signups'):
     $signups = new Signups($db, $user);
     list($result, $totalCount) = $signups->query((int) $_GET["limit"], (int) $_GET["index"]);
     httpResponse($result, $totalCount);
     break;
 case validateRoute('GET', 'ipchanges'):
     $ipchanges = new IpChanges($db, $user);
     list($result, $totalCount) = $ipchanges->query((int) $_GET["limit"], (int) $_GET["index"]);
     httpResponse($result, $totalCount);
     break;
 case validateRoute('POST', 'reports'):
     $reports = new Reports($db, $user);
     httpResponse($reports->create($postdata));
     break;
 case validateRoute('GET', 'reports'):
     $mailbox = new Mailbox($db, $user);
     $torrent = new Torrent($db, $user);
     $subtitles = new Subtitles($db, $user);
     $requests = new Requests($db, $user);
     $forum = new Forum($db, $user);
     $log = new Logs($db);
     $comments = new Comments($db, $user);
     $reports = new Reports($db, $user, $torrent, $subtitles, $requests, $forum, $mailbox, $comments, $log);
     list($result, $totalCount) = $reports->query(array("limit" => $_GET["limit"], "index" => $_GET["index"]));
     httpResponse($result, $totalCount);
     break;
 case validateRoute('PATCH', 'reports/\\d+'):
     $reports = new Reports($db, $user);
開發者ID:lordgabber,項目名稱:rartracker,代碼行數:31,代碼來源:api-v1.php

示例2: report

 /**
  * Create report from REST request and get response.
  *
  * @access public
  *
  * @param WP_REST_Request $request Current request.
  * @return WP_REST_Response $response Response for /reports endpoint.
  */
 public function report(\WP_REST_Request $request)
 {
     Reports::create($request->get_body_params());
     return self::reports($request);
 }
開發者ID:dimadin,項目名稱:wis-wp-plugin,代碼行數:13,代碼來源:REST_API.php


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