本文整理汇总了PHP中JsonResponse::accessDenied方法的典型用法代码示例。如果您正苦于以下问题:PHP JsonResponse::accessDenied方法的具体用法?PHP JsonResponse::accessDenied怎么用?PHP JsonResponse::accessDenied使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JsonResponse
的用法示例。
在下文中一共展示了JsonResponse::accessDenied方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
array("drugId" => 3, "drugName" => "ampiclox", "quantity" => 20, "unitId" => 1, "prescription" => array(7)),
array("drugId" => null, "drugName" => null, "quantity" => 20, "unitId" => 1, "prescription" => array(8)));*/
if ($pharmacist_id && $data) {
$isCleared = (new PharmacistController())->clearPrescription($pharmacist_id, $data);
if ($isCleared) {
echo JsonResponse::success("Successfully cleared!");
exit;
} else {
echo JsonResponse::error("Clearing Unsuccessful. Retry.");
exit;
}
} elseif (!$data) {
echo JsonResponse::error("There are no prescriptions to clear");
exit;
} else {
echo JsonResponse::accessDenied();
exit;
}
} elseif ($intent == 'addDrugUnits') {
$values = $_REQUEST['values'];
$units = new PharmacistController();
$result = $units->addDrugUnits($values);
if ($result) {
echo JsonResponse::success('Successfully added drug units!');
exit;
} else {
echo JsonResponse::error('Adding of drug units unsuccessful!');
exit;
}
} elseif ($intent == 'removeDrugUnit') {
$unitRefId = $_REQUEST['id'];