コード例 #1
0
 /**
  * {@inheritdoc}
  */
 public function regenerate($destroy = false, $lifetime = null)
 {
     if (!$this->started) {
         $this->start();
     }
     if ($destroy) {
         $this->destroy();
     }
     return parent::regenerate($destroy, $lifetime);
 }
コード例 #2
0
 /**
  * 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);
 }
コード例 #3
0
 /**
  * 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);
 }