本文整理匯總了PHP中Partner::getStatus方法的典型用法代碼示例。如果您正苦於以下問題:PHP Partner::getStatus方法的具體用法?PHP Partner::getStatus怎麽用?PHP Partner::getStatus使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Partner
的用法示例。
在下文中一共展示了Partner::getStatus方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: errorIfPartnerBlocked
private static function errorIfPartnerBlocked()
{
if (!self::$operatingPartner) {
return;
}
$partnerStatus = self::$operatingPartner->getStatus();
if ($partnerStatus == Partner::PARTNER_STATUS_CONTENT_BLOCK) {
throw new kCoreException("Partner blocked", kCoreException::PARTNER_BLOCKED);
}
if ($partnerStatus == Partner::PARTNER_STATUS_FULL_BLOCK) {
throw new kCoreException("Partner fully blocked", kCoreException::PARTNER_BLOCKED);
}
}
示例2: errorIfPartnerBlocked
private static function errorIfPartnerBlocked()
{
if (!self::$operatingPartner) {
return;
}
$partnerStatus = self::$operatingPartner->getStatus();
if ($partnerStatus == Partner::PARTNER_STATUS_CONTENT_BLOCK) {
throw new KalturaAPIException(APIErrors::SERVICE_FORBIDDEN_CONTENT_BLOCKED);
}
if ($partnerStatus == Partner::PARTNER_STATUS_FULL_BLOCK) {
throw new KalturaAPIException(APIErrors::SERVICE_FORBIDDEN_FULLY_BLOCKED);
}
}
示例3: fromPartner
public function fromPartner(Partner $partner)
{
//$item = new KalturaVarPartnerUsageItem();
if ($partner) {
$this->partnerStatus = $partner->getStatus();
$this->partnerId = $partner->getId();
$this->partnerName = $partner->getPartnerName();
$this->partnerCreatedAt = $partner->getCreatedAt(null);
$this->partnerPackage = $partner->getPartnerPackage();
}
//return $item;
}
示例4: fromPartner
public static function fromPartner(Partner $partner)
{
$item = new KalturaSystemPartnerUsageItem();
if ($partner) {
$item->partnerStatus = $partner->getStatus();
$item->partnerId = $partner->getId();
$item->partnerName = $partner->getPartnerName();
$item->partnerCreatedAt = $partner->getCreatedAt(null);
$item->partnerPackage = $partner->getPartnerPackage();
}
return $item;
}