public function getSession($sessionIdentifier)
    {
        if ($this->currentSession !== null && $this->currentSession->isStarted() && $this->currentSession->getId() === $sessionIdentifier) {
            return $this->currentSession;
        }
        if (isset($this->remoteSessions[$sessionIdentifier])) {
            return $this->remoteSessions[$sessionIdentifier];
        }
        if ($this->metaDataCache->has($sessionIdentifier)) {
            $sessionInfo = $this->metaDataCache->get($sessionIdentifier);
            $this->remoteSessions[$sessionIdentifier] = new Session($sessionIdentifier, $sessionInfo['storageIdentifier'], $sessionInfo['lastActivityTimestamp'], $sessionInfo['tags']);
            return $this->remoteSessions[$sessionIdentifier];
        }
    }
public function getSession($sessionIdentifier)
    {
        if ($this->currentSession !== null && $this->currentSession->isStarted() && $this->currentSession->getId() === $sessionIdentifier) {
            return $this->currentSession;
        }
        if (isset($this->remoteSessions[$sessionIdentifier])) {
            return $this->remoteSessions[$sessionIdentifier];
        }
        if ($this->metaDataCache->has($sessionIdentifier)) {
            $sessionInfo = $this->metaDataCache->get($sessionIdentifier);
            $this->remoteSessions[$sessionIdentifier] = new Session($sessionIdentifier, $sessionInfo['storageIdentifier'], $sessionInfo['lastActivityTimestamp'], $sessionInfo['tags']);
            return $this->remoteSessions[$sessionIdentifier];
        }
    }
public function getSession ( $ sessionIdentifier ) { if ( $ this -> currentSession !== null && $ this -> currentSession -> isStarted ( ) && $ this -> currentSession -> getId ( ) === $ sessionIdentifier ) { return $ this -> currentSession ; } if ( isset ( $ this -> remoteSessions [ $ sessionIdentifier ] ) ) { return $ this -> remoteSessions [ $ sessionIdentifier ] ; } if ( $ this -> metaDataCache -> has ( $ sessionIdentifier ) ) { $ sessionInfo = $ this -> metaDataCache -> get ( $ sessionIdentifier ) ; $ this -> remoteSessions [ $ sessionIdentifier ] = new Session ( $ sessionIdentifier , $ sessionInfo [ 'storageIdentifier' ] , $ sessionInfo [ 'lastActivityTimestamp' ] , $ sessionInfo [ 'tags' ] ) ; return $ this -> remoteSessions [ $ sessionIdentifier ] ; } }
Returns the specified session. If no session with the given identifier exists,
NULL is returned.

@param string $sessionIdentifier The session identifier
@return SessionInterface
@api
Returns the specified session . If no session with the given identifier exists NULL is returned .