本文整理汇总了PHP中Piwik_View::setXFrameOptions方法的典型用法代码示例。如果您正苦于以下问题:PHP Piwik_View::setXFrameOptions方法的具体用法?PHP Piwik_View::setXFrameOptions怎么用?PHP Piwik_View::setXFrameOptions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Piwik_View
的用法示例。
在下文中一共展示了Piwik_View::setXFrameOptions方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: configureView
/**
* Configure common view properties
*
* @param Piwik_View $view
*/
private function configureView($view)
{
$view->linkTitle = Piwik::getRandomTitle();
$view->enableFrames = Zend_Registry::get('config')->General->enable_framed_logins;
if (!$view->enableFrames) {
$view->setXFrameOptions('sameorigin');
}
$view->forceSslLogin = Zend_Registry::get('config')->General->force_ssl_login;
// crsf token: don't trust the submitted value; generate/fetch it from session data
$view->nonce = Piwik_Nonce::getNonce('Piwik_Login.login');
}
示例2: setBasicVariablesView
/**
* Set the minimal variables in the view object
*
* @param Piwik_View $view
*/
protected function setBasicVariablesView($view)
{
$view->topMenu = Piwik_GetTopMenu();
$view->debugTrackVisitsInsidePiwikUI = Piwik_Config::getInstance()->Debug['track_visits_inside_piwik_ui'];
$view->isSuperUser = Zend_Registry::get('access')->isSuperUser();
$view->isCustomLogo = Piwik_Config::getInstance()->branding['use_custom_logo'];
$view->logoHeader = Piwik_API_API::getInstance()->getHeaderLogoUrl();
$view->logoLarge = Piwik_API_API::getInstance()->getLogoUrl();
$view->enableFrames = Piwik_Config::getInstance()->General['enable_framed_pages'] || @Piwik_Config::getInstance()->General['enable_framed_logins'];
if (!$view->enableFrames) {
$view->setXFrameOptions('sameorigin');
}
self::setHostValidationVariablesView($view);
}