本文整理汇总了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;
}