本文整理汇总了PHP中OA_Admin_Template::setCacheId方法的典型用法代码示例。如果您正苦于以下问题:PHP OA_Admin_Template::setCacheId方法的具体用法?PHP OA_Admin_Template::setCacheId怎么用?PHP OA_Admin_Template::setCacheId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OA_Admin_Template
的用法示例。
在下文中一共展示了OA_Admin_Template::setCacheId方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
/**
* The class constructor
*
* @param array $aParams The parameters array, usually $_REQUEST
* @return OA_Dashboard_Widget_Feed
*/
function OA_Dashboard_Widget_Graph($aParams)
{
parent::OA_Dashboard_Widget($aParams);
$this->oTrans = new OX_Translation();
$gdAvailable = extension_loaded('gd');
$this->draw = $gdAvailable && !empty($aParams['draw']);
$this->setDummyData();
$this->oTpl = new OA_Admin_Template($this->draw ? 'passthrough.html' : 'dashboard/graph.html');
$this->oTpl->setCacheId($this->getCacheId());
$this->oTpl->assign('extensionLoaded', $gdAvailable);
}
示例2:
/**
* The class constructor
*
* @param array $aParams The parameters array, usually $_REQUEST
* @param string $title
* @param string $url
* @param int $posts
* @return OA_Dashboard_Widget_Feed
*/
function __construct($aParams, $title, $url, $posts = 6, $siteTitle = null, $siteUrl = null)
{
parent::__construct($aParams);
$this->title = $title;
$this->url = $url;
$this->posts = $posts;
$this->siteTitle = $siteTitle;
$this->siteUrl = $siteUrl;
$this->oTpl = new OA_Admin_Template('dashboard/feed.html');
$this->oTpl->setCacheId($this->title);
$this->oTpl->setCacheLifetime(new Date_Span('0-1-0-0'));
}