@@ 894-899 (lines=6) @@ | ||
891 | */ |
|
892 | public function deregisterSessionBackend( SessionBackend $backend ) { |
|
893 | $id = $backend->getId(); |
|
894 | if ( !isset( $this->allSessionBackends[$id] ) || !isset( $this->allSessionIds[$id] ) || |
|
895 | $this->allSessionBackends[$id] !== $backend || |
|
896 | $this->allSessionIds[$id] !== $backend->getSessionId() |
|
897 | ) { |
|
898 | throw new \InvalidArgumentException( 'Backend was not registered with this SessionManager' ); |
|
899 | } |
|
900 | ||
901 | unset( $this->allSessionBackends[$id] ); |
|
902 | // Explicitly do not unset $this->allSessionIds[$id] |
|
@@ 913-918 (lines=6) @@ | ||
910 | public function changeBackendId( SessionBackend $backend ) { |
|
911 | $sessionId = $backend->getSessionId(); |
|
912 | $oldId = (string)$sessionId; |
|
913 | if ( !isset( $this->allSessionBackends[$oldId] ) || !isset( $this->allSessionIds[$oldId] ) || |
|
914 | $this->allSessionBackends[$oldId] !== $backend || |
|
915 | $this->allSessionIds[$oldId] !== $sessionId |
|
916 | ) { |
|
917 | throw new \InvalidArgumentException( 'Backend was not registered with this SessionManager' ); |
|
918 | } |
|
919 | ||
920 | $newId = $this->generateSessionId(); |
|
921 |