storage:<br/>
class: sfPDOSessionStorage<br/>
param:<br/>
db_table: sf_sessions<br/>
database: doctrine<br/>
db_id_col: sess_id<br/>
db_data_col: sess_data<br/>
db_time_col: sess_time<br/>
storage:
class: mySessionStorage
param:
session_name: soccer
db_table: session
database: main
regenerate: false
<?php
/**
* Adds option for turning off regenerate session id
*
* parameters: see sfSessionStorage
*
* @package symfony
* @subpackage storage
* @author Mathew Toth <developer@poetryleague.com>
* @author Fabien Potencier <fabien.potencier@symfony-project.com>
* @author Sean Kerr <sean@code-box.org>
* @author Sergei Miami <miami@blackcrystal.net>
* @version SVN: $Id$
*/
class mySessionStorage extends sfPDOSessionStorage
{
public function initialize($options = array())
{
// add 'regenerate' option, that is true by default in symfony
$options = array_merge(array(
'regenerate' => true,
), $options);
// initialize the parent
parent::initialize($options);
}
public function regenerate($destroy = false)
{
if ( (bool) $this->options['regenerate'] === true)
{
return parent::regenerate($destroy);
}
}
}