本文整理匯總了PHP中notification::send方法的典型用法代碼示例。如果您正苦於以下問題:PHP notification::send方法的具體用法?PHP notification::send怎麽用?PHP notification::send使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類notification
的用法示例。
在下文中一共展示了notification::send方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: unset
unset($product_row[$product_key]);
}
}
$subject = "Search Ad - Search Ads products budget has ended";
$message = "The following Search Ad products have reached balance 0 (zero)." . PHP_EOL . PHP_EOL;
foreach ($product_row as $product_details) {
$new_balance = $product_details['balance'] - $product_details['last_cost'];
$new_balance = $new_balance < 0 ? 0 : number_format($new_balance, 2);
$add_product_to_message = false;
if ($product_details['balance'] != '') {
try {
$values = array('budget_credit' => $new_balance, 'last_adwords_date' => $yesterday_date);
$db_syssql->update()->table('sYra.google_advertising_product_credit')->values($values)->where('product_data_id = :monthly_budget_product_data_id')->binds(array(':monthly_budget_product_data_id' => $product_details['monthly_budget_product_data_id']))->execute();
} catch (DatabaseException $dbe) {
//Show generic error for db class exceptions
throw new Exception('An error has occurred, please try again');
}
if ($new_balance <= 0) {
$add_product_to_message = true;
}
}
if ($add_product_to_message) {
$message .= "Product ID: {$product_details['product_data_id']}" . PHP_EOL . "Member ID: {$product_details['member_id']}" . PHP_EOL . "Client ID: {$product_details['client_id']}" . PHP_EOL . PHP_EOL;
$send_email = true;
}
}
if ($send_email) {
notification::send($to, FROM_EMAIL, FROM_EMAIL_NAME, $subject, $message);
}
}
cron_commit($execution_id);