public function get($sessionId)
    {
        $result = $this->getConnection()->table('oauth_sessions')
                    ->where('oauth_sessions.id', $sessionId)
                    ->first();

        if (is_null($result)) {
            return;
        }

        return (new SessionEntity($this->getServer()))
               ->setId($result->id)
               ->setOwner($result->owner_type, $result->owner_id);
    }
public function get($sessionId)
    {
        $result = $this->getConnection()->table('oauth_sessions')
                    ->where('oauth_sessions.id', $sessionId)
                    ->first();

        if (is_null($result)) {
            return;
        }

        return (new SessionEntity($this->getServer()))
               ->setId($result->id)
               ->setOwner($result->owner_type, $result->owner_id);
    }
public function get ( $ sessionId ) { $ result = $ this -> getConnection ( ) -> table ( 'oauth_sessions' ) -> where ( 'oauth_sessions.id' , $ sessionId ) -> first ( ) ; if ( is_null ( $ result ) ) { return ; } return ( new SessionEntity ( $ this -> getServer ( ) ) ) -> setId ( $ result -> id ) -> setOwner ( $ result -> owner_type , $ result -> owner_id ) ; }
Get a session from it's identifier.

@param string $sessionId

@return \League\OAuth2\Server\Entity\SessionEntity
Get a session from it s identifier .