|
@@ 1064-1069 (lines=6) @@
|
| 1061 |
|
*/ |
| 1062 |
|
public function deregisterSessionBackend( SessionBackend $backend ) { |
| 1063 |
|
$id = $backend->getId(); |
| 1064 |
|
if ( !isset( $this->allSessionBackends[$id] ) || !isset( $this->allSessionIds[$id] ) || |
| 1065 |
|
$this->allSessionBackends[$id] !== $backend || |
| 1066 |
|
$this->allSessionIds[$id] !== $backend->getSessionId() |
| 1067 |
|
) { |
| 1068 |
|
throw new \InvalidArgumentException( 'Backend was not registered with this SessionManager' ); |
| 1069 |
|
} |
| 1070 |
|
|
| 1071 |
|
unset( $this->allSessionBackends[$id] ); |
| 1072 |
|
// Explicitly do not unset $this->allSessionIds[$id] |
|
@@ 1083-1088 (lines=6) @@
|
| 1080 |
|
public function changeBackendId( SessionBackend $backend ) { |
| 1081 |
|
$sessionId = $backend->getSessionId(); |
| 1082 |
|
$oldId = (string)$sessionId; |
| 1083 |
|
if ( !isset( $this->allSessionBackends[$oldId] ) || !isset( $this->allSessionIds[$oldId] ) || |
| 1084 |
|
$this->allSessionBackends[$oldId] !== $backend || |
| 1085 |
|
$this->allSessionIds[$oldId] !== $sessionId |
| 1086 |
|
) { |
| 1087 |
|
throw new \InvalidArgumentException( 'Backend was not registered with this SessionManager' ); |
| 1088 |
|
} |
| 1089 |
|
|
| 1090 |
|
$newId = $this->generateSessionId(); |
| 1091 |
|
|