FeedItem::__construct PHP Method

__construct() public method

public __construct ( $feedId = null, $feedItemId = null, $status = null, $startTime = null, $endTime = null, $attributeValues = null, $policyData = null, $devicePreference = null, $scheduling = null, $campaignTargeting = null, $adGroupTargeting = null, $keywordTargeting = null, $geoTargeting = null, $urlCustomParameters = null )
        public function __construct($feedId = null, $feedItemId = null, $status = null, $startTime = null, $endTime = null, $attributeValues = null, $policyData = null, $devicePreference = null, $scheduling = null, $campaignTargeting = null, $adGroupTargeting = null, $keywordTargeting = null, $geoTargeting = null, $urlCustomParameters = null)
        {
            $this->feedId = $feedId;
            $this->feedItemId = $feedItemId;
            $this->status = $status;
            $this->startTime = $startTime;
            $this->endTime = $endTime;
            $this->attributeValues = $attributeValues;
            $this->policyData = $policyData;
            $this->devicePreference = $devicePreference;
            $this->scheduling = $scheduling;
            $this->campaignTargeting = $campaignTargeting;
            $this->adGroupTargeting = $adGroupTargeting;
            $this->keywordTargeting = $keywordTargeting;
            $this->geoTargeting = $geoTargeting;
            $this->urlCustomParameters = $urlCustomParameters;
        }

Same methods

FeedItem::__construct ( $feedId = null, $feedItemId = null, $status = null, $startTime = null, $endTime = null, $attributeValues = null, $policyData = null, $devicePreference = null, $scheduling = null, $campaignTargeting = null, $adGroupTargeting = null, $keywordTargeting = null, $geoTargeting = null, $geoTargetingRestriction = null, $urlCustomParameters = null )

Usage Example

Example #1
0
 /**
  * @param Title $title Title object that this entry is for.
  * @param String $pubDate Publish date formattable by wfTimestamp.
  * @param Array $keywords list of (String) keywords
  * @param Mixed Boolean or Integer. Namespace containing comments page for entry.
  *   True for the corresponding talk page of $title
  *   False for none
  *   An integer for the page name of $title in the specific namespace denoted by that integer.
  */
 public function __construct($title, $pubDate, $keywords = '', $comment = true)
 {
     if (!$title || !$title instanceof Title) {
         // Paranoia
         throw new MWException('Invalid title object passed to FeedSMItem');
     }
     $commentsURL = '';
     if ($comment === true) {
         // The comment ns is this article's talk namespace.
         $commentsURL = $title->getTalkPage()->getFullUrl();
     } elseif (is_int($comment)) {
         // There's a specific comments namespace.
         $commentsTitle = Title::makeTitle($comment, $title->getDBkey());
         if ($commentsTitle) {
             $commentsURL = $commentsTitle->getFullUrl();
         }
     }
     $this->keywords = $keywords;
     $this->titleObj = $title;
     parent::__construct($title->getText(), '', $title->getFullURL(), $pubDate, '', $commentsURL);
 }
All Usage Examples Of FeedItem::__construct