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


PHP Tag::fetchAll方法代码示例

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


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

示例1: findTags

 public function findTags($id)
 {
     Zend_Registry::get('logger')->entering();
     $tags = new Tag();
     $subquery = $this->_db->select();
     $subquery->from('tags_items', 'tag_id');
     $subquery->where('item_id = ?', $id);
     return $tags->fetchAll('id IN (' . $subquery . ')');
     Zend_Registry::get('logger')->exiting();
 }
开发者ID:josephholsten,项目名称:swaplady,代码行数:10,代码来源:Item.php

示例2: admineditAction

 function admineditAction()
 {
     $reportTab = new ReportTab();
     $this->view->reportTab = $reportTab->fetchRow("id = " . $this->getRequest()->getParam('id'));
     $campaign = new Campaign();
     $this->view->campaigns = $campaign->fetchAll();
     $tag = new Tag();
     $this->view->tags = $tag->fetchAll();
     $tagging = new Tagging();
     //$taggings = $tagging->fetchAll($tagging->select()->from('taggings', 'tag_id')->where('report_tab_id = ? ', $this->getRequest()->getParam('id')));
     $taggings = $tagging->findBy(array('report_tab_id' => $this->getRequest()->getParam('id')));
     $tagging_ids = array();
     foreach ($taggings as $tagging) {
         array_push($tagging_ids, $tagging->tag_id);
     }
     $this->view->taggings = $tagging_ids;
 }
开发者ID:omusico,项目名称:wildfire_php,代码行数:17,代码来源:ReporttabController.php

示例3: tagAction

 public function tagAction()
 {
     $this->_helper->viewRenderer->setNeverRender();
     $this->view->layout()->disableLayout();
     $get = Zend_Registry::get('getFilter');
     $search = $get->q;
     $tag = new Tag();
     $tags = $tag->fetchAll();
     //echo $search;
     if ($search != '') {
         foreach ($tags as $t) {
             if (strpos(strtolower($t->name), $search) !== false) {
                 echo $t->name . "|" . $t->tagId . "\n";
             }
         }
     }
 }
开发者ID:ncsuwebdev,项目名称:classmate,代码行数:17,代码来源:IndexController.php

示例4: init

 public function init()
 {
     // doctype
     $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');
     $viewRenderer->view->doctype('XHTML1_STRICT');
     // js + css
     $this->view->headScript()->prependFile('/js/swfobject/swfobject.js');
     $this->view->headLink()->prependStylesheet('/css/base.css?' . date('Ymd'));
     // tags
     $tagManager = new Tag();
     $this->view->tags = $tagManager->fetchAll(null, "(SELECT COUNT(*) FROM posts_tags WHERE tag_id = tags.id) DESC");
     // description
     if ($this->view->metaDescription === NULL) {
         $this->view->metaDescription = 'Hi, my name is Neil Garb and I\'m a web developer.';
     }
     // keywords
     if ($this->view->metaKeywords === NULL) {
         $this->view->metaKeywords = array('codecaine', 'codecaine.co.za', 'neil garb', 'php', 'php blog', 'web developer', 'web development', 'blog', 'cape town', 'south africa');
     }
 }
开发者ID:neilgarb,项目名称:codecaine,代码行数:20,代码来源:Action.php

示例5: indexAction

 public function indexAction()
 {
     $this->logger->entering();
     $this->logger->info('Load all tags');
     $tagTable = new Tag();
     $tagSet = $tagTable->fetchAll();
     $this->logger->info('Load item count for each tag');
     $tags = array();
     foreach ($tagSet as $tag) {
         $tag = $tag->toArray();
         $tag['count'] = $tagTable->findItems($tag['id'])->count();
         $tags[] = $tag;
     }
     $this->logger->debug("Got '" . count($tags) . "' tags");
     $this->logger->info('Load view parameters');
     $this->view->assign(array('title' => 'Keywords', 'tags' => $tags));
     $this->logger->info('Render view');
     $this->render();
     $this->logger->exiting();
 }
开发者ID:josephholsten,项目名称:swaplady,代码行数:20,代码来源:TagController.php

示例6: sitemapAction

 public function sitemapAction()
 {
     header('Content-Type: application/xhtml+xml');
     $urls = array('/' => mktime(0, 0, 0, date('m'), date('d'), date('Y')), '/about' => mktime(0, 0, 0, date('m'), date('d'), date('Y')));
     $postManager = new Post();
     $posts = $postManager->fetchAll(array('is_active = ?' => 1), 'posted_at DESC');
     foreach ($posts as $post) {
         $urls['/posts/' . $post->label] = strtotime($post->posted_at);
     }
     $tagManager = new Tag();
     $tags = $tagManager->fetchAll(null, 'title');
     foreach ($tags as $tag) {
         $urls['/tags/' . $tag->label] = mktime(0, 0, 0, date('m'), date('d'), date('Y'));
     }
     echo '<' . '?xml version="1.0"?' . '>' . "\n" . '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' . "\n";
     foreach ($urls as $u => $t) {
         echo "\t" . '<url>' . "\n" . "\t\t" . '<loc>http://codecaine.co.za' . $u . '</loc>' . "\n" . "\t\t" . '<lastMod>' . date('Y-m-d', $t) . 'T' . date('H:i:s', $t) . '+2:00</lastMod>' . "\n" . "\t" . '</url>' . "\n";
     }
     echo '</urlset>';
     die;
 }
开发者ID:neilgarb,项目名称:codecaine,代码行数:21,代码来源:IndexController.php


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