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


PHP TPL::getSitemapRSSOrXML方法代码示例

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


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

示例1: renderFrontendPage


//.........这里部分代码省略.........
             break;
             // TXTs ... them defaults;
         // TXTs ... them defaults;
         case FRONTEND_SECTION_URL:
             // Do a switch ...
             switch ($_GET[FRONTEND_SECTION_URL]) {
                 case FRONTEND_HOME:
                     // Damn, you're good ...
                     $tpF = new FilePath($this->getPathToSkin()->toRelativePath() . 'home.tp');
                     break;
                 default:
                     // Get'em tiger ...
                     $tpF = new FilePath($this->getPathToSkin()->toRelativePath() . 'content.tp');
                     break;
             }
             // Go my baby ... GO ...
             TPL::tpSet($this->objURLImageDir, new S('objURLImageDir'), $tpF);
             TPL::tpSet($this->ATH, new S('ATH'), $tpF);
             TPL::tpSet($this->STG, new S('STG'), $tpF);
             TPL::tpSet($this->TXT, new S('TXT'), $tpF);
             TPL::tpSet($this->ART, new S('ART'), $tpF);
             TPL::tpSet($this->AUD, new S('AUD'), $tpF);
             TPL::tpSet($this->CNT, new S('CNT'), $tpF);
             TPL::tpSet($this->FAQ, new S('FAQ'), $tpF);
             TPL::tpSet($this->LRQ, new S('LRQ'), $tpF);
             TPL::tpExe($tpF);
             break;
             ######################## THIS WILL NEVER - EVER - EVER - EVER - EVER - EVER CHANGE ########################
             // RSS Feeds ...
         ######################## THIS WILL NEVER - EVER - EVER - EVER - EVER - EVER CHANGE ########################
         // RSS Feeds ...
         case FRONTEND_RSS_XML:
             // Get the object ...
             $objRSS = TPL::getSitemapRSSOrXML(new S('RSS'));
             $objDTE = date(DATE_RFC822, $_SERVER['REQUEST_TIME']);
             $objTTL = $this->STG->getConfigKey(new S('settings_website_default_title'));
             $objXML = $objRSS->addCHILD(self::RSS_CHANNEL);
             $objXML->addCHILD(self::RSS_LINK, DOCUMENT_HOST);
             $objXML->addCHILD(self::RSS_PUBLISHED_DATE, $objDTE);
             $objXML->addCHILD(self::RSS_TITLE, $objTTL);
             $objXML->addCHILD(self::RSS_DESCRIPTION, $objTTL);
             // Go through ALL and XML my booty ... passed by reference ... yah baby!
             $this->AUD->renderWidget(new S('widgetRSS'), new A(array('objXML' => $objXML)));
             $this->ART->renderWidget(new S('widgetRSS'), new A(array('objXML' => $objXML)));
             $this->TXT->renderWidget(new S('widgetRSS'), new A(array('objXML' => $objXML)));
             $this->PRD->renderWidget(new S('widgetRSS'), new A(array('objXML' => $objXML)));
             // Do them XML ...
             TPL::outputXMLString(new S($objRSS->asXML()));
             break;
             // XML Sitemap ...
         // XML Sitemap ...
         case FRONTEND_STE_MAP:
             // Get the object ...
             $objXML = TPL::getSitemapRSSOrXML(new S('MAP'));
             if (isset($_GET['Type'])) {
                 switch ($_GET['Type']) {
                     case 'Lyrics':
                         $this->LRQ->renderWidget(new S('widgetXML'), new A(array('objXML' => $objXML, 'objId' => $_GET['Id'])));
                         break;
                 }
             } else {
                 // Go through ALL and XML my booty ... passed by reference ... yah baby!
                 $this->AUD->renderWidget(new S('widgetXML'), new A(array('objXML' => $objXML)));
                 $this->ART->renderWidget(new S('widgetXML'), new A(array('objXML' => $objXML)));
                 $this->TXT->renderWidget(new S('widgetXML'), new A(array('objXML' => $objXML)));
                 $this->PRD->renderWidget(new S('widgetXML'), new A(array('objXML' => $objXML)));
开发者ID:ajbm6,项目名称:raphpframework,代码行数:67,代码来源:00_Frontend.php


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