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


PHP myPartnerUtils::doPartnerUsage方法代碼示例

本文整理匯總了PHP中myPartnerUtils::doPartnerUsage方法的典型用法代碼示例。如果您正苦於以下問題:PHP myPartnerUtils::doPartnerUsage方法的具體用法?PHP myPartnerUtils::doPartnerUsage怎麽用?PHP myPartnerUtils::doPartnerUsage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在myPartnerUtils的用法示例。


在下文中一共展示了myPartnerUtils::doPartnerUsage方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: myBatchPartnerUsage

 public function myBatchPartnerUsage($partnerId = null)
 {
     self::initDb();
     $partners_exists = true;
     $start_pos = 0;
     $bulk_size = 500;
     while ($partners_exists) {
         $c = new Criteria();
         if (!is_null($partnerId)) {
             $c->addAnd(PartnerPeer::ID, $partnerId);
         }
         $c->addAnd(PartnerPeer::PARTNER_PACKAGE, 1);
         // get only free partners
         $c->addAnd(PartnerPeer::MONITOR_USAGE, 1);
         $c->addAnd(PartnerPeer::STATUS, Partner::PARTNER_STATUS_DELETED, CRITERIA::NOT_EQUAL);
         $c->setOffset($start_pos);
         $c->setLimit($bulk_size);
         $partners = PartnerPeer::doSelect($c);
         if (!$partners) {
             KalturaLog::debug("No more partners. offset: {$start_pos} , limit: {$bulk_size} .");
             $partners_exists = false;
         } else {
             KalturaLog::debug("Looping " . ($start_pos + $bulk_size - 1) . " partners, offset: {$start_pos} .");
             foreach ($partners as $partner) {
                 myPartnerUtils::doPartnerUsage($partner, true);
             }
         }
         unset($partners);
         PartnerPeer::clearInstancePool();
         $start_pos += $bulk_size;
     }
 }
開發者ID:EfncoPlugins,項目名稱:Media-Management-based-on-Kaltura,代碼行數:32,代碼來源:myBatchPartnerUsage.class.php

示例2: myBatchPartnerUsage

 public function myBatchPartnerUsage()
 {
     self::initDb();
     $partners_exists = true;
     $start_pos = 0;
     $bulk_size = 500;
     while ($partners_exists) {
         $c = new Criteria();
         // get only free partners
         $c->addAnd(PartnerPeer::PARTNER_PACKAGE, 1);
         $c->addAnd(PartnerPeer::MONITOR_USAGE, 1);
         $c->setOffset($start_pos);
         $c->setLimit($bulk_size);
         $partners = PartnerPeer::doSelect($c);
         if (!$partners) {
             TRACE("No more partners. offset: {$start_pos} , limit: {$bulk_size} .");
             $partners_exists = false;
         } else {
             TRACE("Looping " . ($start_pos + $bulk_size - 1) . " partners, offset: {$start_pos} .");
             foreach ($partners as $partner) {
                 myPartnerUtils::doPartnerUsage($partner, true);
             }
         }
         unset($partners);
         $start_pos += $bulk_size;
     }
 }
開發者ID:richhl,項目名稱:kalturaCE,代碼行數:27,代碼來源:myBatchPartnerUsage.class.php


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