当前位置: 首页>>代码示例>>PHP>>正文


PHP feed::create方法代码示例

本文整理汇总了PHP中feed::create方法的典型用法代码示例。如果您正苦于以下问题:PHP feed::create方法的具体用法?PHP feed::create怎么用?PHP feed::create使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在feed的用法示例。


在下文中一共展示了feed::create方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: test_create

 /**
  * @test
  *
  * @dataProvider provider_create
  *
  * @covers feed::create
  *
  * @param string  $info     info to pass
  * @param integer $items    items to add
  * @param integer $matcher  output
  */
 public function test_create($info, $items, $enviroment, $matcher_item, $matchers_image)
 {
     $this->setEnvironment($enviroment);
     $this->assertTag($matcher_item, feed::create($info, $items), '', FALSE);
     foreach ($matchers_image as $matcher_image) {
         $this->assertTag($matcher_image, feed::create($info, $items), '', FALSE);
     }
 }
开发者ID:reznikds,项目名称:Reznik,代码行数:19,代码来源:FeedTest.php

示例2: campaigns

 public function campaigns($limit = 20)
 {
     $this->info['description'] = 'Spicer\'s Campaigns';
     $this->info['lastBuildDate'] = date(DATE_RFC2822, Orm::factory('campaign')->where('status', 'approved')->find()->created);
     $campaigns = Orm::factory('campaign')->where('status', 'approved')->find_all($limit);
     foreach ($campaigns as $campaign) {
         $items[] = array('title' => $campaign->name, 'link' => 'campaigns/view/' . $campaign->name, 'guid' => 'campaigns/view/' . $campaign->name, 'description' => $campaign->description, 'author' => 'admin@spicers.com.au (Spicers)', 'pubDate' => date(DATE_RFC2822, $campaign->created));
     }
     echo feed::create($this->info, $items);
 }
开发者ID:HIVE-Creative,项目名称:spicers,代码行数:10,代码来源:rss.php

示例3: index

 public function index()
 {
     $this->template->content = new View('feed');
     $this->template->title = 'Feed';
     $limit = '0,20';
     if (isset($_POST['limit'])) {
         $limit = $_POST['limit'];
     }
     $messages = Message_Model::get_translated_messages($limit);
     $info = array('notes' => 'This is an RSS feed of the translated SMS messages.');
     $items = array();
     foreach ($messages as $id => $msg) {
         $items[] = array('title' => string_manipulation::xmlentities($msg['sms']), 'link' => 'http://localhost:8888/SMSTurks/feed/' . $id, 'description' => string_manipulation::xmlentities($msg['translation']), 'author' => $msg['number'], 'pubDate' => date('D, d M Y H:i:s O', strtotime($msg['received'])));
     }
     $this->template->content->display = feed::create($info, $items);
 }
开发者ID:ushahidi,项目名称:SMS-Turks,代码行数:16,代码来源:feed.php

示例4: comments

 public function comments()
 {
     header('Content-Type: text/xml; charset=UTF-8', TRUE);
     if ($cache = $this->cache->get('s7n_blog_feed_comments')) {
         echo $cache;
         return;
     }
     $comments = ORM::factory('blog_comment')->orderby('id', 'desc')->find_all(20);
     $info = array('title' => config::get('s7n.site_title') . ' (Latest Comments)', 'link' => url::current_site(), 'generator' => 'S7Ncms - http://www.s7n.de/');
     $items = array();
     foreach ($comments as $comment) {
         $items[] = array('author' => html::specialchars($comment->author), 'pubDate' => date('r', strtotime($comment->date)), 'title' => 'New comment for "' . $comment->blog_post->title . '"', 'description' => html::specialchars($comment->content), 'link' => $comment->blog_post->url(), 'guid' => $comment->blog_post->url());
     }
     $feed = feed::create($info, $items);
     $this->cache->set('s7n_blog_feed_comments', $feed);
     echo $feed;
 }
开发者ID:googlecode-mirror,项目名称:s7ncms,代码行数:17,代码来源:feed.php


注:本文中的feed::create方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。