本文整理匯總了PHP中Generic::success方法的典型用法代碼示例。如果您正苦於以下問題:PHP Generic::success方法的具體用法?PHP Generic::success怎麽用?PHP Generic::success使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Generic
的用法示例。
在下文中一共展示了Generic::success方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: updateRestaurantDiscount
public function updateRestaurantDiscount()
{
if (Efiwebsetting::getData('checkOAuth') == 'yes') {
IMBAuth::checkOAuth();
}
$discount = Generic::mustCheck($_POST["disc_resto"], "No Discount");
$idResto = Generic::mustCheck($_POST["id_restaurant"], Keys::$ERR_NOT_FOUND_ID_RESTAURANT);
$resto = new MasterRestaurantModel();
$resto->getByID($idResto);
$resto->disc_resto = $discount;
$resto->save();
Generic::success("Charges Updates");
}
示例2: updateDokuToken
public function updateDokuToken()
{
$idUser = Generic::mustCheck($_GET['id_user'], Keys::$ERR_NOT_FOUND_ID_USER);
$email = Generic::mustCheck($_GET['email'], Keys::$ERR_USER_EMPTY_EMAIL);
$user = new UserModel();
$user->getByID($idUser);
$dWallet = new PaymentDoku();
$idDokuWallet = $dWallet->registerCustomer($user->full_name, $email, $user->phone_no);
if ($idDokuWallet) {
$user->payment_id = $idDokuWallet;
$user->save();
Generic::success("Doku Wallet Updated");
} else {
Generic::errorMsg("Failed to Update Doku Wallet");
}
}