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


PHP Partner::setStreamEntriesOverageUnit方法代碼示例

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


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

示例1: apply

 /**
  * @param Partner $partner
  */
 public function apply(Partner $partner)
 {
     if ($this->isNull('max')) {
         $this->max = null;
     }
     if ($this->isNull('overagePrice')) {
         $this->overagePrice = null;
     }
     if ($this->isNull('overageUnit')) {
         $this->overageUnit = null;
     }
     switch ($this->type) {
         case KalturaSystemPartnerLimitType::ENTRIES:
             $partner->setEntriesQuota($this->max);
             $partner->setEntriesOveragePrice($this->overagePrice);
             $partner->setEntriesOverageUnit($this->overageUnit);
             break;
         case KalturaSystemPartnerLimitType::MONTHLY_STREAM_ENTRIES:
             $partner->setStreamEntriesQuota($this->max);
             $partner->setStreamEntriesOveragePrice($this->overagePrice);
             $partner->setStreamEntriesOverageUnit($this->overageUnit);
             break;
         case KalturaSystemPartnerLimitType::MONTHLY_BANDWIDTH:
             $partner->setBandwidthQuota($this->max);
             $partner->setBandwidthOveragePrice($this->overagePrice);
             $partner->setBandwidthOverageUnit($this->overageUnit);
             break;
         case KalturaSystemPartnerLimitType::PUBLISHERS:
             $partner->setPublishersQuota($this->max);
             $partner->setPublishersOveragePrice($this->overagePrice);
             $partner->setPublishersOverageUnit($this->overageUnit);
             break;
         case KalturaSystemPartnerLimitType::LOGIN_USERS:
             $partner->setLoginUsersQuota($this->max);
             $partner->setLoginUsersOveragePrice($this->overagePrice);
             $partner->setLoginUsersOverageUnit($this->overageUnit);
             break;
         case KalturaSystemPartnerLimitType::ADMIN_LOGIN_USERS:
             $partner->setAdminLoginUsersQuota($this->max);
             $partner->setAdminLoginUsersOveragePrice($this->overagePrice);
             $partner->setAdminLoginUsersOverageUnit($this->overageUnit);
             break;
         case KalturaSystemPartnerLimitType::BULK_SIZE:
             $partner->setMaxBulkSize($this->max);
             $partner->setMaxBulkSizeOveragePrice($this->overagePrice);
             $partner->setMaxBulkSizeOverageUnit($this->overageUnit);
             break;
         case KalturaSystemPartnerLimitType::MONTHLY_STORAGE:
             $partner->setMonthlyStorage($this->max);
             $partner->setMonthlyStorageOveragePrice($this->overagePrice);
             $partner->setMonthlyStorageOverageUnit($this->overageUnit);
             break;
         case KalturaSystemPartnerLimitType::MONTHLY_STORAGE_AND_BANDWIDTH:
             $partner->setMonthlyStorageAndBandwidth($this->max);
             $partner->setMonthlyStorageAndBandwidthOveragePrice($this->overagePrice);
             $partner->setMonthlyStorageAndBandwidthOverageUnit($this->overageUnit);
             break;
         case KalturaSystemPartnerLimitType::END_USERS:
             $partner->setEndUsers($this->max);
             $partner->setEndUsersOveragePrice($this->overagePrice);
             $partner->setEndUsersOverageUnit($this->overageUnit);
             break;
     }
     parent::apply($partner);
 }
開發者ID:DBezemer,項目名稱:server,代碼行數:68,代碼來源:KalturaSystemPartnerOveragedLimit.php


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