本文整理汇总了PHP中SSViewer::get_source_file_comments方法的典型用法代码示例。如果您正苦于以下问题:PHP SSViewer::get_source_file_comments方法的具体用法?PHP SSViewer::get_source_file_comments怎么用?PHP SSViewer::get_source_file_comments使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SSViewer
的用法示例。
在下文中一共展示了SSViewer::get_source_file_comments方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: feedContent
/**
* Return the content of the RSS feed.
*
* Also temporarily disabled source file comments, and restores
* to previous state once content has been rendered.
*
* @return string
*/
function feedContent()
{
$prevState = SSViewer::get_source_file_comments();
SSViewer::set_source_file_comments(false);
$content = str_replace(' ', ' ', $this->renderWith($this->getTemplate()));
SSViewer::set_source_file_comments($prevState);
return $content;
}
示例2: EcommerceMenuTitle
/**
*@return String (HTML Snippet)
**/
function EcommerceMenuTitle()
{
$count = 0;
$order = ShoppingCart::current_order();
if ($order) {
$count = $order->TotalItems();
$oldSSViewer = SSViewer::get_source_file_comments();
SSViewer::set_source_file_comments(false);
$this->customise(array("Count" => $count, "OriginalMenuTitle" => $this->MenuTitle));
$s = $this->renderWith("AjaxNumItemsInCart");
SSViewer::set_source_file_comments($oldSSViewer);
return $s;
}
return $this->OriginalMenuTitle();
}
示例3: outputToBrowser
/**
* Output the feed to the browser
*/
public function outputToBrowser()
{
$prevState = SSViewer::get_source_file_comments();
SSViewer::set_source_file_comments(false);
if (is_int($this->lastModified)) {
HTTP::register_modification_timestamp($this->lastModified);
header('Last-Modified: ' . gmdate("D, d M Y H:i:s", $this->lastModified) . ' GMT');
}
if (!empty($this->etag)) {
HTTP::register_etag($this->etag);
}
if (!headers_sent()) {
HTTP::add_cache_headers();
header("Content-type: text/xml");
}
SSViewer::set_source_file_comments($prevState);
return $this->renderWith($this->getTemplate());
}