本文整理汇总了PHP中TPL::outputXMLString方法的典型用法代码示例。如果您正苦于以下问题:PHP TPL::outputXMLString方法的具体用法?PHP TPL::outputXMLString怎么用?PHP TPL::outputXMLString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TPL
的用法示例。
在下文中一共展示了TPL::outputXMLString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderFrontendPage
//.........这里部分代码省略.........
// 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)));
}
// Do them XML ...
TPL::outputXMLString(new S($objXML->asXML()));
break;
// Errors ... (404, etc)
// Errors ... (404, etc)
case FRONTEND_ERROR_URL:
// Check the code is defined ... or 404 if not ...
if ($this->STG->checkErrorPageCodeIsUnique($this->objCOD = $_GET[FRONTEND_ERROR_URL])->toBoolean() == TRUE) {
$this->setHeaderKey(URL::staticURL(new A(array(FRONTEND_ERROR_URL)), new A(array('404'))), new S('Location'));
}
// Set some requirements ...
$this->objCDE = $this->STG->getErrorPageByCode($this->objCOD, Settings::$objSettingsErrTableFCode);
$this->objTTL = $this->STG->getErrorPageByCode($this->objCOD, Settings::$objSettingsErrTableFTitle);
$this->objCNT = $this->STG->getErrorPageByCode($this->objCOD, Settings::$objSettingsErrTableFContent);
// Set the title ...
TPL::manageTTL($this->objCDE);
TPL::manageTTL($this->objTTL);
// Set the template file ...
$tpF = new FilePath($this->getPathToSkin()->toRelativePath() . 'error.tp');
TPL::tpSet($this->objURLImageDir, new S('objURLImageDir'), $tpF);
// Set'em vars ...
TPL::tpSet($this->objCNT, new S('objCNT'), $tpF);
TPL::tpSet($this->objTTL, new S('objTTL'), $tpF);
TPL::tpSet($this->objCDE, new S('objCDE'), $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::tpExe($tpF);
break;
}
}