コード例 #1
0
ファイル: server.php プロジェクト: juicylevel/navy-journal
        break;
    case 'completeRunUp':
        $result = $requestHandler->completeRunUp();
        break;
    case 'completeDuty':
        $result = $requestHandler->completeDuty();
        break;
    case 'getDutyList':
        $result = $requestHandler->getDutyList($offset, $pageSize, json_decode($sort, true));
        break;
    case 'getProvisionsData':
        $result = $requestHandler->getProvisionsData(json_decode($sort, true));
        break;
    case 'getProvisionsItems':
        $result = $requestHandler->getProvisionsItems(json_decode($sort, true));
        break;
    case 'saveProvisionsItem':
        $result = $requestHandler->saveProvisionsItem($item, $sort);
        break;
    case 'getAccumulators':
        $result = $requestHandler->getAccumulators(json_decode($sort, true));
        break;
    case 'saveAccumulator':
        $result = $requestHandler->saveAccumulator($item, $sort);
        break;
    default:
        trigger_error('Unknow method "' . $request . '"', E_USER_ERROR);
}
//sleep(1);
$response = array('apiMethod' => $request, 'result' => $result);
echo json_encode($response, JSON_NUMERIC_CHECK);