本文整理汇总了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);