當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CEvent::CheckEvents方法代碼示例

本文整理匯總了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();
 }
開發者ID:notamedia,項目名稱:console-jedi,代碼行數:15,代碼來源:ExecuteCommand.php

示例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();
開發者ID:pivvas,項目名稱:ratio,代碼行數:30,代碼來源:reminder.php

示例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();
 }
開發者ID:k-kalashnikov,項目名稱:geekcon_new,代碼行數:12,代碼來源:main.php

示例4: EpilogActions

 function EpilogActions()
 {
     CEvent::CheckEvents();
     CMain::FileAction();
 }
開發者ID:,項目名稱:,代碼行數:5,代碼來源:


注:本文中的CEvent::CheckEvents方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。