当前位置: 首页>>代码示例>>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;未经允许,请勿转载。