当前位置: 首页>>代码示例>>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;未经允许,请勿转载。