@@ 80-91 (lines=12) @@ | ||
77 | return $this->oldIds; |
|
78 | } |
|
79 | ||
80 | public function begin() |
|
81 | { |
|
82 | if ($this->status === \PHP_SESSION_ACTIVE) { |
|
83 | return true; |
|
84 | } |
|
85 | ||
86 | $this->status = \PHP_SESSION_ACTIVE; |
|
87 | ||
88 | if ($this->id === '') { |
|
89 | $this->id = $this->sessionId->generate(); |
|
90 | } |
|
91 | } |
|
92 | ||
93 | public function end() |
|
94 | { |
|
@@ 113-124 (lines=12) @@ | ||
110 | return $this->status === \PHP_SESSION_ACTIVE; |
|
111 | } |
|
112 | ||
113 | public function regenerate(): bool |
|
114 | { |
|
115 | // Can only regenerate active sessions |
|
116 | if ($this->status !== \PHP_SESSION_ACTIVE) { |
|
117 | return false; |
|
118 | } |
|
119 | ||
120 | $this->oldIds[] = $this->id; |
|
121 | $this->id = $this->sessionId->generate(); |
|
122 | ||
123 | return true; |
|
124 | } |
|
125 | ||
126 | public function toArray(): array |
|
127 | { |