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

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

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

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

        return (new AccessTokenEntity($this->getServer()))
               ->setId($result->id)
               ->setExpireTime((int) $result->expire_time);
    }
public function get ( $ token ) { $ result = $ this -> getConnection ( ) -> table ( 'oauth_access_tokens' ) -> where ( 'oauth_access_tokens.id' , $ token ) -> first ( ) ; if ( is_null ( $ result ) ) { return ; } return ( new AccessTokenEntity ( $ this -> getServer ( ) ) ) -> setId ( $ result -> id ) -> setExpireTime ( ( int ) $ result -> expire_time ) ; }
Get an instance of Entities\AccessToken.

@param string $token The access token

@return null|AbstractTokenEntity
Get an instance of Entities \ AccessToken .