本文整理汇总了PHP中Requests::createOrUpdate方法的典型用法代码示例。如果您正苦于以下问题:PHP Requests::createOrUpdate方法的具体用法?PHP Requests::createOrUpdate怎么用?PHP Requests::createOrUpdate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Requests
的用法示例。
在下文中一共展示了Requests::createOrUpdate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: httpResponse
$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"]));
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);