本文整理汇总了PHP中Feed::getFeeds方法的典型用法代码示例。如果您正苦于以下问题:PHP Feed::getFeeds方法的具体用法?PHP Feed::getFeeds怎么用?PHP Feed::getFeeds使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Feed
的用法示例。
在下文中一共展示了Feed::getFeeds方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: updateMemcache
function updateMemcache()
{
// ignore_user_abort();
//set_time_limit(0);
//$interval=3600; //(seconds)
require_once 'model/Feed.php';
require_once 'lib/BitMemCache.php';
require_once 'lib/RssReader.php';
$feed = new Feed();
$feeds = $feed->getFeeds();
$logger = LogUtil::getLogger();
//do{
include "config/site.php";
foreach ($feeds as $feed) {
$url = $feed['url'];
$mem = new BitMemCache();
$reader = new RssReader();
$rss = $reader->fetch($url);
if (!$rss) {
} else {
if ($mem->init()) {
$mem->set($url, json_encode($rss));
$logger->info("update memcache {$url}");
}
}
}
// sleep($interval);
//}while($memcache);
}
示例2: listnews
function listnews()
{
include "config/site.php";
require_once 'model/Feed.php';
$feed = new Feed();
$feeds = $feed->getFeeds();
require "view/admin/feednews.php";
}
示例3: actionFeed
/**
* Feed ajax 读取
*/
public function actionFeed()
{
$type = Yii::app()->request->getParam('type');
$uid = Yii::app()->request->getParam('uid');
$feeds = array();
$model = new Feed();
$feeds = $model->getFeeds($uid, $type, $page, $opts);
$data = array('feeds' => $feeds);
$this->renderPartial('feed', $data, '', false);
}
示例4:
requireComponent('Bloglounge.Model.Users');
$id = User::getIdByName($keyword);
$sQuery = ' owner = ' . $id;
} else {
$sQuery = ' title LIKE "%' . $keyword . '%"';
}
if(!empty($read)) { $page = Feed::getPredictionPage($read,$pageCount,$sQuery); }
if($is_admin) {
list($feeds, $totalFeeds) = Feed::getFeeds($page,$pageCount,$sQuery);
} else {
list($feeds, $totalFeeds) = Feed::getFeedsByOwner(getLoggedId(), $page, $pageCount,$sQuery);
}
} else {
if(!empty($read)) { $page = Feed::getPredictionPage($read,$pageCount); }
if($is_admin) {
list($feeds, $totalFeeds) = Feed::getFeeds($page,$pageCount);
} else {
list($feeds, $totalFeeds) = Feed::getFeedsByOwner(getLoggedId(), $page, $pageCount);
}
}
$paging = Func::makePaging($page, $pageCount, $totalFeeds);
$config = new Settings;
requireComponent('Bloglounge.Data.Groups');
$groups = Group::getGroupsAll();
?>
<script type="text/javascript">
示例5: unset
// XSRF protection with token
if (!empty($_POST)) {
if (!Session::isToken($_POST['token'])) {
$pb->assign('message', Intl::msg('Wrong token'));
$pb->renderPage('message');
}
unset($_SESSION['tokens']);
}
$kfc = new FeedConf(CONFIG_FILE, FEED_VERSION);
$kf = new Feed(DATA_FILE, CACHE_DIR, $kfc);
$ks = new Star(STAR_FILE, ITEM_FILE, $kfc);
// autosave opml
if (Session::isLogged()) {
if (!is_file(OPML_FILE)) {
$kf->loadData();
file_put_contents(OPML_FILE, Opml::generateOpml($kf->getFeeds(), $kf->getFolders()));
} else {
if (filemtime(OPML_FILE) < time() - UPDATECHECK_INTERVAL) {
$kf->loadData();
rename(OPML_FILE, OPML_FILE_SAVE);
file_put_contents(OPML_FILE, Opml::generateOpml($kf->getFeeds(), $kf->getFolders()));
}
}
}
// List or Expanded ?
$view = $kfc->view;
// show or hide list of feeds ?
$listFeeds = $kfc->listFeeds;
// All or Unread ?
$filter = $kfc->filter;
// newerFirst or olderFirst
示例6:
<?php
define('ROOT', '..');
include ROOT . '/lib/include.php';
include ROOT . '/lib/begin.php';
// 피드 목록
$pageCount = $skinConfig->feedListPage;
list($feeds, $totalFeeds) = Feed::getFeeds($page, $pageCount, $skinConfig->feedListPageOrder);
$paging = Func::makePaging($page, $pageCount, $totalFeeds);
include ROOT.'/lib/piece/feed_message.php';
include ROOT.'/lib/piece/feedlist.php';
include ROOT.'/lib/end.php';
?>