本文整理汇总了PHP中Mage_Core_Model_Session_Abstract::start方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Core_Model_Session_Abstract::start方法的具体用法?PHP Mage_Core_Model_Session_Abstract::start怎么用?PHP Mage_Core_Model_Session_Abstract::start使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Core_Model_Session_Abstract
的用法示例。
在下文中一共展示了Mage_Core_Model_Session_Abstract::start方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: start
/**
* {@inheritDoc}
*/
public function start()
{
if (self::$sessionStarted) {
return;
}
// start Magento session
$this->session->start();
self::$sessionStarted = true;
}
示例2: testSessionSaveMethod
/**
* @param string $saveMethod
* @param string $iniValue
* @dataProvider sessionSaveMethodDataProvider
*/
public function testSessionSaveMethod($saveMethod, $iniValue)
{
$this->markTestIncomplete('Bug MAGE-5487');
// depending on configuration some values cannot be set as default save session handlers.
// in such cases warnings will be generated by php and test will fail
$origErrorRep = error_reporting(E_ALL ^ E_WARNING);
$origSessionHandler = ini_set('session.save_handler', $iniValue);
if ($iniValue && ini_get('session.save_handler') != $iniValue) {
ini_set('session.save_handler', $origSessionHandler);
error_reporting($origErrorRep);
$this->markTestSkipped("Can't set '{$iniValue}' as session save handler");
}
ini_set('session.save_handler', $origSessionHandler);
Mage::getConfig()->setNode(Mage_Core_Model_Session_Abstract::XML_NODE_SESSION_SAVE, $saveMethod);
/**
* @var Mage_Core_Model_Session_Abstract_Varien
*/
$model = new Mage_Core_Model_Session_Abstract();
//There is no any possibility to determine whether session already started or not in php before 5.4
$model->setSkipEmptySessionCheck(true);
$model->start();
if ($iniValue) {
$this->assertEquals(ini_get('session.save_handler'), $iniValue);
}
ini_set('session.save_handler', $origSessionHandler);
error_reporting($origErrorRep);
}
示例3: start
public function start($sessionName = null)
{
parent::start($sessionName = null);
$this->sessionIds[] = $this->getSessionId();
return $this;
}