本文整理汇总了PHP中Feedback::getList方法的典型用法代码示例。如果您正苦于以下问题:PHP Feedback::getList方法的具体用法?PHP Feedback::getList怎么用?PHP Feedback::getList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Feedback
的用法示例。
在下文中一共展示了Feedback::getList方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
function __construct()
{
$this->checkRights();
if (Funcs::$uri[2] == '') {
$list = Feedback::getList();
View::plugin('index', array('list' => $list));
} elseif (Funcs::$uri[2] == 'history') {
$list = Feedback::getList('history');
View::plugin('index', array('list' => $list));
}
}
示例2: errorResponse
if (isset($_GET['referenceId'])) {
$referenceId = $_GET['referenceId'];
}
$userId = '';
if (isset($_GET['userId'])) {
$userId = $_GET['userId'];
}
if ($tripId === '' || $referenceId === '') {
$response = errorResponse(RESPONSE_BAD_REQUEST);
} else {
if (!$auth->canGetFeedback($tripId, $referenceId)) {
$response = errorResponse(RESPONSE_UNAUTHORIZED);
} else {
if ($userId === '') {
// Request for a list
$list = Feedback::getList($tripId, $referenceId);
$response = successResponse();
$response['tripId'] = $tripId;
$response['referenceId'] = $referenceId;
$response['list'] = $list;
} else {
$object = new Feedback($tripId, $referenceId, $userId);
if ($object->getCreated() === null) {
$response = errorResponse(RESPONSE_NOT_FOUND);
} else {
$response = successResponse();
$response['tripId'] = $object->getTripId();
$response['referenceId'] = $object->getReferenceId();
$response['userId'] = $object->getUserId();
$response['created'] = $object->getCreated();
$response['updated'] = $object->getUpdated();