コード例 #1
0
ファイル: RssFeed.php プロジェクト: robbytaylor/boom-core
 public function addItem(Rss $feed, Page $page)
 {
     $authors = (array) Helpers::getTags($page, 'Author');
     foreach ($authors as &$author) {
         $author = $author->getName();
     }
     $feed->item(['guid' => $page->url(), 'title' => $page->getTitle(), 'description|cdata' => $page->getDescription(), 'link' => $page->url(), 'pubDate' => $page->getVisibleFrom()->format('r'), 'author|cdata' => empty($authors) ? null : implode(',', $authors)]);
 }
コード例 #2
0
ファイル: RssFeed.php プロジェクト: imanghafoori1/boom-core
 public function addItem(Rss $feed, Page $page)
 {
     $tags = Helpers::getTags($page, 'Author');
     $authors = [];
     if (count($tags)) {
         foreach ($tags as $tag) {
             $authors[] = $tag->getName();
         }
     }
     $feed->item(['guid' => $page->url(), 'title' => $page->getTitle(), 'description|cdata' => $page->getDescription(), 'link' => $page->url(), 'pubDate' => $page->getVisibleFrom()->format('r'), 'author|cdata' => empty($authors) ? null : implode(',', $authors)]);
 }
コード例 #3
0
ファイル: _ide_helper.php プロジェクト: xiao-hu00/phphub
 /**
  * Parameters :
  * - title
  * - link
  * - description
  * - author
  * - category
  * - comments
  * - enclosure
  * - guid
  * - pubDate
  * - source
  *
  * @static 
  */
 public static function item($parameters)
 {
     return \Thujohn\Rss\Rss::item($parameters);
 }