本文整理汇总了PHP中CEvent::CheckEvents方法的典型用法代码示例。如果您正苦于以下问题:PHP CEvent::CheckEvents方法的具体用法?PHP CEvent::CheckEvents怎么用?PHP CEvent::CheckEvents使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CEvent
的用法示例。
在下文中一共展示了CEvent::CheckEvents方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: execute
/**
* {@inheritdoc}
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
@set_time_limit(0);
@ignore_user_abort(true);
define('CHK_EVENT', true);
$agentManager = new \CAgent();
$agentManager->CheckAgents();
define('BX_CRONTAB_SUPPORT', true);
define('BX_CRONTAB', true);
$eventManager = new \CEvent();
$eventManager->CheckEvents();
}
示例2: while
while ($ar_sales = $db_sales->Fetch()) {
$arFilterBasket = array("ORDER_ID" => $ar_sales['ID']);
$arBasketItems = array();
$dbB = CSaleBasket::GetList(array("ID" => "ASC"), $arFilterBasket, false, false, array("ID", "PRODUCT_ID", "NAME", "QUANTITY", "PRICE", "CURRENCY", "DETAIL_PAGE_URL", "LID", "CAN_BUY", "SUBSCRIBE", "DELAY", 'ORDER_ID'));
// Создадим массив с товарами, которые находятся в заказах, распределенными по пользователям
while ($arB = $dbB->Fetch()) {
$arOrderedItemsByUser[$arUser['ID']][$arB['PRODUCT_ID']] = $arB['PRODUCT_ID'];
}
}
}
// Отфильтруем из отложенных товаров те, которые были отправленны в заказ. Для этого создадим новый массив
foreach ($arItemsByUser as $userID => $userItems) {
foreach ($userItems as $itemIndex => $arItem) {
if (!in_array($arItem['PRODUCT_ID'], $arOrderedItemsByUser[$userID])) {
$arItemsByUserFinal[$userID][] = $arItem;
}
}
}
// Создадим почтовые события
foreach ($arItemsByUserFinal as $userID => $arItems) {
$arUser = $arUsers[$userID];
$products = '';
foreach ($arItems as $arItem) {
$products .= $arItem['NAME'] . "\r\n";
}
$arEventFields = array("NAME" => $arUser['NAME'], "LAST_NAME" => $arUser['LAST_NAME'], "EMAIL_TO" => $arUser['EMAIL'], "PRODUCT_LIST" => $products);
CEvent::Send("REMIND_BASKET", 's1', $arEventFields);
}
// Отправим письма
CEvent::CheckEvents();
示例3: EpilogActions
function EpilogActions()
{
global $DB;
//send email events
if (COption::GetOptionString("main", "check_events", "Y") !== "N") {
$DB->StartUsingMasterOnly();
CEvent::CheckEvents();
$DB->StopUsingMasterOnly();
}
//files cleanup
CMain::FileAction();
}
示例4: EpilogActions
function EpilogActions()
{
CEvent::CheckEvents();
CMain::FileAction();
}