コード例 #1
0
 public static function execute(&$Logger, &$ParentWorkflow, \model\openrtb\RtbBidRequest &$RtbBidRequest, \model\openrtb\RtbBidRequestImp &$RtbBidRequestImp, &$AdCampaignBanner, &$AdCampaignBannerRestrictionsFactory)
 {
     /*
      * Check banner restrictions (optional fields)
      */
     $params = array();
     $params["AdCampaignBannerID"] = $AdCampaignBanner->AdCampaignBannerID;
     $AdCampaignBannerRestrictions = $AdCampaignBannerRestrictionsFactory->get_row_cached($ParentWorkflow->config, $params);
     // no banner restriction info to base rejection on
     if ($AdCampaignBannerRestrictions === null) {
         return true;
     }
     // Check if the banner is in an IFRAME
     if (\buyrtb\workflows\tasklets\display\adcampaignbannerrestrictions\CheckInIFrame::execute($Logger, $ParentWorkflow, $RtbBidRequest, $RtbBidRequestImp, $AdCampaignBanner, $AdCampaignBannerRestrictions) === false) {
         return false;
     }
     // Check banner system fold position
     if (\buyrtb\workflows\tasklets\display\adcampaignbannerrestrictions\CheckFoldPosition::execute($Logger, $ParentWorkflow, $RtbBidRequest, $RtbBidRequestImp, $AdCampaignBanner, $AdCampaignBannerRestrictions) === false) {
         return false;
     }
     // Check browser language
     if (\buyrtb\workflows\tasklets\display\adcampaignbannerrestrictions\CheckHttpLanguage::execute($Logger, $ParentWorkflow, $RtbBidRequest, $RtbBidRequestImp, $AdCampaignBanner, $AdCampaignBannerRestrictions) === false) {
         return false;
     }
     // Check browser user-agent for string
     if (\buyrtb\workflows\tasklets\display\adcampaignbannerrestrictions\CheckBrowserUserAgent::execute($Logger, $ParentWorkflow, $RtbBidRequest, $RtbBidRequestImp, $AdCampaignBanner, $AdCampaignBannerRestrictions) === false) {
         return false;
     }
     // Check banner for PMP Enable
     if (\buyrtb\workflows\tasklets\common\adcampaignmediarestrictions\CheckPrivateMarketPlaceEnabled::execute($Logger, $ParentWorkflow, $RtbBidRequest, $RtbBidRequestImp, $AdCampaignBanner, $AdCampaignBannerRestrictions) === false) {
         return false;
     }
     // Check banner for https:// secure
     if (\buyrtb\workflows\tasklets\common\adcampaignmediarestrictions\CheckSecureOnly::execute($Logger, $ParentWorkflow, $RtbBidRequest, $RtbBidRequestImp, $AdCampaignBanner, $AdCampaignBannerRestrictions) === false) {
         return false;
     }
     // Check user for Coppa opt out status
     if (\buyrtb\workflows\tasklets\common\adcampaignmediarestrictions\CheckCoppaOptOut::execute($Logger, $ParentWorkflow, $RtbBidRequest, $RtbBidRequestImp, $AdCampaignBanner, $AdCampaignBannerRestrictions) === false) {
         return false;
     }
     // Check banner for it being in the right vertical
     if (\buyrtb\workflows\tasklets\common\adcampaignmediarestrictions\CheckVertical::execute($Logger, $ParentWorkflow, $RtbBidRequest, $RtbBidRequestImp, $AdCampaignBanner, $AdCampaignBannerRestrictions) === false) {
         return false;
     }
     // Check banner geography
     if (\buyrtb\workflows\tasklets\common\adcampaignmediarestrictions\CheckGeo::execute($Logger, $ParentWorkflow, $RtbBidRequest, $RtbBidRequestImp, $AdCampaignBanner, $AdCampaignBannerRestrictions) === false) {
         return false;
     }
     return true;
 }
コード例 #2
0
 public static function execute(&$Logger, &$ParentWorkflow, \model\openrtb\RtbBidRequest &$RtbBidRequest, \model\openrtb\RtbBidRequestImp &$RtbBidRequestImp, &$AdCampaignBanner, &$AdCampaignVideoRestrictionsFactory)
 {
     /*
      * Check banner restrictions (optional fields)
      */
     $params = array();
     $params["AdCampaignBannerID"] = $AdCampaignBanner->AdCampaignBannerID;
     $AdCampaignVideoRestrictions = $AdCampaignVideoRestrictionsFactory->get_row_cached($ParentWorkflow->config, $params);
     // no banner restriction info to base rejection on
     if ($AdCampaignVideoRestrictions === null) {
         return true;
     }
     // Check video height and width match
     if (\buyrtb\workflows\tasklets\video\adcampaignvideorestrictions\CheckVideoDimensions::execute($Logger, $ParentWorkflow, $RtbBidRequest, $RtbBidRequestImp, $AdCampaignBanner, $AdCampaignVideoRestrictions) === false) {
         return false;
     }
     // Check video fold position
     if (\buyrtb\workflows\tasklets\video\adcampaignvideorestrictions\CheckFoldPosition::execute($Logger, $ParentWorkflow, $RtbBidRequest, $RtbBidRequestImp, $AdCampaignBanner, $AdCampaignVideoRestrictions) === false) {
         return false;
     }
     // Check Duration
     if (\buyrtb\workflows\tasklets\video\adcampaignvideorestrictions\CheckDuration::execute($Logger, $ParentWorkflow, $RtbBidRequest, $RtbBidRequestImp, $AdCampaignBanner, $AdCampaignVideoRestrictions) === false) {
         return false;
     }
     // Check Mime Types
     if (\buyrtb\workflows\tasklets\video\adcampaignvideorestrictions\CheckMimeTypes::execute($Logger, $ParentWorkflow, $RtbBidRequest, $RtbBidRequestImp, $AdCampaignBanner, $AdCampaignVideoRestrictions) === false) {
         return false;
     }
     // Check Delivery Type
     if (\buyrtb\workflows\tasklets\video\adcampaignvideorestrictions\CheckDelivery::execute($Logger, $ParentWorkflow, $RtbBidRequest, $RtbBidRequestImp, $AdCampaignBanner, $AdCampaignVideoRestrictions) === false) {
         return false;
     }
     // Check Playback Methods
     if (\buyrtb\workflows\tasklets\video\adcampaignvideorestrictions\CheckPlayback::execute($Logger, $ParentWorkflow, $RtbBidRequest, $RtbBidRequestImp, $AdCampaignBanner, $AdCampaignVideoRestrictions) === false) {
         return false;
     }
     // Check Protocols
     if (\buyrtb\workflows\tasklets\video\adcampaignvideorestrictions\CheckProtocols::execute($Logger, $ParentWorkflow, $RtbBidRequest, $RtbBidRequestImp, $AdCampaignBanner, $AdCampaignVideoRestrictions) === false) {
         return false;
     }
     // Check Start Delay
     if (\buyrtb\workflows\tasklets\video\adcampaignvideorestrictions\CheckStartDelay::execute($Logger, $ParentWorkflow, $RtbBidRequest, $RtbBidRequestImp, $AdCampaignBanner, $AdCampaignVideoRestrictions) === false) {
         return false;
     }
     // Check Supported APIs
     if (\buyrtb\workflows\tasklets\video\adcampaignvideorestrictions\CheckSupportedApis::execute($Logger, $ParentWorkflow, $RtbBidRequest, $RtbBidRequestImp, $AdCampaignBanner, $AdCampaignVideoRestrictions) === false) {
         return false;
     }
     // Check banner for PMP Enable
     if (\buyrtb\workflows\tasklets\common\adcampaignmediarestrictions\CheckPrivateMarketPlaceEnabled::execute($Logger, $ParentWorkflow, $RtbBidRequest, $RtbBidRequestImp, $AdCampaignBanner, $AdCampaignVideoRestrictions) === false) {
         return false;
     }
     // Check banner for https:// secure
     if (\buyrtb\workflows\tasklets\common\adcampaignmediarestrictions\CheckSecureOnly::execute($Logger, $ParentWorkflow, $RtbBidRequest, $RtbBidRequestImp, $AdCampaignBanner, $AdCampaignVideoRestrictions) === false) {
         return false;
     }
     // Check user for Coppa opt out status
     if (\buyrtb\workflows\tasklets\common\adcampaignmediarestrictions\CheckCoppaOptOut::execute($Logger, $ParentWorkflow, $RtbBidRequest, $RtbBidRequestImp, $AdCampaignBanner, $AdCampaignVideoRestrictions) === false) {
         return false;
     }
     // Check banner for it being in the right vertical
     if (\buyrtb\workflows\tasklets\common\adcampaignmediarestrictions\CheckVertical::execute($Logger, $ParentWorkflow, $RtbBidRequest, $RtbBidRequestImp, $AdCampaignBanner, $AdCampaignVideoRestrictions) === false) {
         return false;
     }
     // Check banner geography
     if (\buyrtb\workflows\tasklets\common\adcampaignmediarestrictions\CheckGeo::execute($Logger, $ParentWorkflow, $RtbBidRequest, $RtbBidRequestImp, $AdCampaignBanner, $AdCampaignVideoRestrictions) === false) {
         return false;
     }
     return true;
 }