本文整理汇总了PHP中_limitationsIsCampaignCapped函数的典型用法代码示例。如果您正苦于以下问题:PHP _limitationsIsCampaignCapped函数的具体用法?PHP _limitationsIsCampaignCapped怎么用?PHP _limitationsIsCampaignCapped使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了_limitationsIsCampaignCapped函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: MAX_limitationsIsAdForbidden
/**
* A function to test if an ad may or may not be delivered, based on that ad's
* ad blocking, ad capping, campaign blocking and campaign capping rules.
*
* Returns true if the ad is blocked or capped (and hence cannot be delivered),
* false otherwise (in which case the ad can be delivered).
*
* Always returns true if the viewer does not allow cookies to be set, so that
* blocking and capping cannot be circumvented by disabling cookies.
*
* @param array $aAd An array with the values of 'block_ad', 'cap_ad',
* 'session_cap_ad', 'block_campaign', 'cap_campaign' and
* 'session_cap_campaign' defined.
* @return boolean True if the ad is blocked or capped, false otherwise.
*/
function MAX_limitationsIsAdForbidden($aAd)
{
$adId = $aAd['ad_id'];
$campaignId = $aAd['placement_id'];
$showCappedNoCookie = (bool) $aAd['show_capped_no_cookie'];
return _limitationsIsAdCapped($adId, $aAd['cap_ad'], $aAd['session_cap_ad'], $aAd['block_ad'], $showCappedNoCookie) || _limitationsIsCampaignCapped($campaignId, $aAd['cap_campaign'], $aAd['session_cap_campaign'], $aAd['block_campaign'], $showCappedNoCookie);
}
示例2: MAX_limitationsIsAdForbidden
function MAX_limitationsIsAdForbidden($aAd)
{
$adId = $aAd['ad_id'];
$campaignId = $aAd['placement_id'];
return _limitationsIsAdCapped($adId, $aAd['cap_ad'], $aAd['session_cap_ad'], $aAd['block_ad']) || _limitationsIsCampaignCapped($campaignId, $aAd['cap_campaign'], $aAd['session_cap_campaign'], $aAd['block_campaign']);
}