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


PHP Feed::get_all方法代码示例

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


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

示例1: showAction

 function showAction()
 {
     $this->group = new Group($this->args[1]);
     $this->feeds = Feed::get_all('WHERE group_id=' . $this->group->id);
     $this->screens = Screen::get_all('WHERE group_id=' . $this->group->id);
     $this->setTitle($this->group->name);
     $this->setSubject($this->group->name);
     $this->canEdit = $_SESSION['user']->can_write('group', $this->args[1]);
 }
开发者ID:TNValleyFiddlersConvention,项目名称:fiddlers,代码行数:9,代码来源:controller.php

示例2: listAction

 function listAction()
 {
     $this->feeds['public_feeds'] = Feed::get_all("WHERE type = 0 ORDER BY name");
     $this->feeds['restricted_feeds'] = Feed::get_all("WHERE type = 2 OR type = 1 OR type = 4 ORDER BY name");
     if ($_SESSION['user']->admin_privileges) {
         $this->feeds['private_feeds'] = Feed::get_all("WHERE type = 3  ORDER BY name");
     } else {
         $group_str = implode(',', $_SESSION['user']->groups);
         $this->feeds['private_feeds'] = Feed::get_all("WHERE type = 3 AND group_id IN ({$group_str}) ORDER BY name");
     }
     if (!is_array($this->feeds['public_feeds'])) {
         $this->feeds['public_feeds'] = array();
     }
     if (!is_array($this->feeds['restricted_feeds'])) {
         $this->feeds['restricted_feeds'] = array();
     }
     if (!is_array($this->feeds['private_feeds'])) {
         $this->feeds['private_feeds'] = array();
     }
 }
开发者ID:TNValleyFiddlersConvention,项目名称:fiddlers,代码行数:20,代码来源:controller.php

示例3: subscriptionsAction

 function subscriptionsAction()
 {
     $this->screen = new Screen($this->args[1]);
     if (!$this->screen->set) {
         $this->flash("Screen not found", "error");
         redirect_to("../");
     }
     $this->setTitle('Managing Subscriptions for ' . $this->screen->name);
     $this->setSubject($this->screen->name);
     $this->feeds = Feed::get_all();
     $this->templateobj = new Template($this->screen->template_id);
     //Template is a keyword for the controller, so I call it something else
 }
开发者ID:TNValleyFiddlersConvention,项目名称:fiddlers,代码行数:13,代码来源:controller.php

示例4: deny_expired

function deny_expired()
{
    $notification = "The content was denied automatically.  A moderator did not review this item before the expiration date.";
    $feeds = Feed::get_all();
    foreach ($feeds as $feed) {
        $contents = $feed->content_get('NULL');
        //Content that hasn't been moderated
        if ($contents) {
            foreach ($contents as $content) {
                if (strtotime($content['content']->end_time) < strtotime('NOW')) {
                    $feed->content_mod($content['content']->id, 0, 0, $content['content']->get_duration($feed), $notification);
                    echo "Denied {$content['content']->name} on {$feed->name}\n";
                }
            }
        }
    }
}
开发者ID:Elwell,项目名称:concerto,代码行数:17,代码来源:cron.php


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