public function get($token)
    {
        $result = $this->getConnection()->table('oauth_refresh_tokens')
                ->where('oauth_refresh_tokens.id', $token)
                ->where('oauth_refresh_tokens.expire_time', '>=', time())
                ->first();

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

        return (new RefreshTokenEntity($this->getServer()))
               ->setId($result->id)
               ->setAccessTokenId($result->access_token_id)
               ->setExpireTime((int) $result->expire_time);
    }
public function get($token)
    {
        $result = $this->getConnection()->table('oauth_refresh_tokens')
                ->where('oauth_refresh_tokens.id', $token)
                ->where('oauth_refresh_tokens.expire_time', '>=', time())
                ->first();

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

        return (new RefreshTokenEntity($this->getServer()))
               ->setId($result->id)
               ->setAccessTokenId($result->access_token_id)
               ->setExpireTime((int) $result->expire_time);
    }
public function get ( $ token ) { $ result = $ this -> getConnection ( ) -> table ( 'oauth_refresh_tokens' ) -> where ( 'oauth_refresh_tokens.id' , $ token ) -> where ( 'oauth_refresh_tokens.expire_time' , '>=' , time ( ) ) -> first ( ) ; if ( is_null ( $ result ) ) { return ; } return ( new RefreshTokenEntity ( $ this -> getServer ( ) ) ) -> setId ( $ result -> id ) -> setAccessTokenId ( $ result -> access_token_id ) -> setExpireTime ( ( int ) $ result -> expire_time ) ; }
Return a new instance of \League\OAuth2\Server\Entity\RefreshTokenEntity.

@param string $token

@return \League\OAuth2\Server\Entity\RefreshTokenEntity
Return a new instance of \ League \ OAuth2 \ Server \ Entity \ RefreshTokenEntity .