當前位置: 首頁>>代碼示例>>PHP>>正文


PHP FeedItem::__construct方法代碼示例

本文整理匯總了PHP中FeedItem::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP FeedItem::__construct方法的具體用法?PHP FeedItem::__construct怎麽用?PHP FeedItem::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在FeedItem的用法示例。


在下文中一共展示了FeedItem::__construct方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
  * @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);
 }
開發者ID:schwarer2006,項目名稱:wikia,代碼行數:30,代碼來源:FeedSMItem.php

示例2: FeedItem

 function __construct($version = RSS2)
 {
     parent::__construct($version);
     $this->version = $version;
     $this->feeditem = new FeedItem($version);
     // Setting default value for essential channel elements
     $this->channels['title'] = $version . ' Feed';
     $this->channels['link'] = 'http://www.sorewarding.com';
     //Tag names to encode in CDATA
     $this->CDATAEncoding = array('description', 'content:encoded', 'summary');
 }
開發者ID:badtux,項目名稱:pmg,代碼行數:11,代碼來源:aiofeedwriter.php

示例3: __construct

 public function __construct($title, $url, $text, $date)
 {
     parent::__construct($title, $text, $url, $date);
 }
開發者ID:schwarer2006,項目名稱:wikia,代碼行數:4,代碼來源:FeaturedFeeds.body.php

示例4: array

 function __construct($title, $description, $url, $date = '', $author = '', $comments = '', $OtherTags = false)
 {
     parent::__construct($title, $description, $url, $date, $author, $comments);
     $this->OtherTags = !empty($OtherTags) ? $OtherTags : array();
 }
開發者ID:Tjorriemorrie,項目名稱:app,代碼行數:5,代碼來源:PartnerFeed.class.php


注:本文中的FeedItem::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。