本文整理汇总了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);
}
示例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');
}
示例3: __construct
public function __construct($title, $url, $text, $date)
{
parent::__construct($title, $text, $url, $date);
}
示例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();
}