/** * {@inheritdoc} */ public function regenerate($destroy = false, $lifetime = null) { if (!$this->started) { $this->start(); } if ($destroy) { $this->destroy(); } return parent::regenerate($destroy, $lifetime); }
/** * Constructor. * * @param string $savePath Path of directory to save session files. * @param array $options Session options. * * @see AbstractSessionStorage::__construct() */ public function __construct($savePath = null, array $options = array()) { if (null === $savePath) { $savePath = sys_get_temp_dir(); } if (!is_dir($savePath)) { mkdir($savePath, 0777, true); } $this->savePath = $savePath; parent::__construct($options); }
/** * Constructor. * * @param string $savePath Path of directory to save session files. * @param string $name Session name. */ public function __construct($savePath = null, $name = 'MOCKSESSID') { if (null === $savePath) { $savePath = sys_get_temp_dir(); } if (!is_dir($savePath)) { mkdir($savePath, 0777, true); } $this->savePath = $savePath; parent::__construct($name); }