本文整理匯總了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);
}