public function getScopes(SessionEntity $session)
    {
        // TODO: Check this before pushing
        $result = $this->getConnection()->table('oauth_session_scopes')
                  ->select('oauth_scopes.*')
                  ->join('oauth_scopes', 'oauth_session_scopes.scope_id', '=', 'oauth_scopes.id')
                  ->where('oauth_session_scopes.session_id', $session->getId())
                  ->get();

        $scopes = [];

        foreach ($result as $scope) {
            $scopes[] = (new ScopeEntity($this->getServer()))->hydrate([
                'id' => $scope->id,
                'description' => $scope->description,
            ]);
        }

        return $scopes;
    }
public function getScopes(SessionEntity $session)
    {
        // TODO: Check this before pushing
        $result = $this->getConnection()->table('oauth_session_scopes')
                  ->select('oauth_scopes.*')
                  ->join('oauth_scopes', 'oauth_session_scopes.scope_id', '=', 'oauth_scopes.id')
                  ->where('oauth_session_scopes.session_id', $session->getId())
                  ->get();

        $scopes = [];

        foreach ($result as $scope) {
            $scopes[] = (new ScopeEntity($this->getServer()))->hydrate([
                'id' => $scope->id,
                'description' => $scope->description,
            ]);
        }

        return $scopes;
    }
public function getScopes ( SessionEntity $ session ) { // TODO: Check this before pushing $ result = $ this -> getConnection ( ) -> table ( 'oauth_session_scopes' ) -> select ( 'oauth_scopes.*' ) -> join ( 'oauth_scopes' , 'oauth_session_scopes.scope_id' , '=' , 'oauth_scopes.id' ) -> where ( 'oauth_session_scopes.session_id' , $ session -> getId ( ) ) -> get ( ) ; $ scopes = [ ] ; foreach ( $ result as $ scope ) { $ scopes [ ] = ( new ScopeEntity ( $ this -> getServer ( ) ) ) -> hydrate ( [ 'id' => $ scope -> id , 'description' => $ scope -> description , ] ) ; } return $ scopes ; }
Get a session's scopes.

@param \League\OAuth2\Server\Entity\SessionEntity

@return array Array of \League\OAuth2\Server\Entity\ScopeEntity
Get a session s scopes .