本文整理汇总了PHP中Mage_Core_Model_Session_Abstract::init方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Core_Model_Session_Abstract::init方法的具体用法?PHP Mage_Core_Model_Session_Abstract::init怎么用?PHP Mage_Core_Model_Session_Abstract::init使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Core_Model_Session_Abstract
的用法示例。
在下文中一共展示了Mage_Core_Model_Session_Abstract::init方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testIsValidForHost
public function testIsValidForHost()
{
$_SERVER['HTTP_HOST'] = 'localhost';
$this->_model->init('test');
$this->assertFalse($this->_model->isValidForHost('test.com'));
$this->assertTrue($this->_model->isValidForHost('localhost'));
}
示例2: init
/**
* Pull out information from session whether there is currently the first page after log in
*
* The idea is to set this value on login(), then redirect happens,
* after that on next request the value is grabbed once the session is initialized
* Since the session is used as a singleton, the value will be in $_isFirstPageAfterLogin until the end of request,
* unless it is reset intentionally from somewhere
*
* @param string $namespace
* @param string $sessionName
* @return Mage_Admin_Model_Session
* @see self::login()
*/
public function init($namespace, $sessionName = null)
{
parent::init($namespace, $sessionName);
$this->isFirstPageAfterLogin();
return $this;
}