示例#1
0
文件: Feed.php 项目: ankhzet/Ankh
 public function make(FeedChanelContract $chanel)
 {
     $this->feeder->title = Lang::get('common.site') . ' - ' . $chanel->title();
     $this->feeder->link = $chanel->url();
     $this->feeder->pubdate = $chanel->feedItems(function ($item) {
         $this->feeder->add($item->title, $item->author, $item->url, $item->created, $item->description, $item->content);
     }, $this->limit);
     return $this;
 }
示例#2
0
 public function register(FeedChanel $chanel)
 {
     $this->chanels[strtolower($chanel->name())] = $chanel;
 }