Beispiel #1
0
 public static function QueueNext($IBLOCK_ID = false, $cnt = 0)
 {
     if ($res = CIntranetSharepointQueue::Next($IBLOCK_ID, $cnt)) {
         if (!self::CheckService($res, $res['SP_METHOD'])) {
             return true;
         }
         $handler = new $res['HANDLER_CLASS']($res['SP_URL']);
         $RESULT = call_user_func_array(array($handler, $res['SP_METHOD']), array(CIntranetUtils::makeGUID($res['SP_LIST_ID']), $res['SP_METHOD_PARAMS']));
         CIntranetSharepointQueue::SetMinID($res['ID']);
         if (is_array($res['CALLBACK']) && is_callable(array($res['CALLBACK'][0], $res['CALLBACK'][1]))) {
             $arParams = $res['CALLBACK'][2];
             $arParams[] = $RESULT;
             call_user_func_array(array($res['CALLBACK'][0], $res['CALLBACK'][1]), $arParams);
         }
         return true;
     }
     return false;
 }