Isset不使用对象的内容

I have $list when I print it then I get following output

AWeberEntry Object
(
[_privateData:protected] => Array
    (
        [0] => resource_type_link
        [1] => http_etag
    )

[_localDiff:protected] => Array
    (
    )

[_collections:protected] => Array
    (
    )

[adapter] => OAuthApplication Object
    (
        [debug] => 
        [userAgent] => AWeber OAuth Consumer Application 1.0 - https://labs.aweber.com/
        [format] => 
        [requiresTokenSecret] => 1
        [signatureMethod] => HMAC-SHA1
        [version] => 1.0
        [curl] => CurlObject Object
            (
            )

        [user] => OAuthUser Object
            (
                [authorizedToken] => 
                [requestToken] => 
                [verifier] => 
                [tokenSecret] => BoPWmqWup6T1oAJAS0BJnKkN830iebnruCQ9I2FL
                [accessToken] => AgJbZty67Z4w1uByP728Ybsr
            )

        [consumerKey] => AkaXl8e3tPa3urnbNI4YvBYQ
        [consumerSecret] => kVGhArLuQT8iY4qMJ94dAk9nmWonKRuKHEBhpa2r
        [app] => AWeberServiceProvider Object
            (
                [baseUri] => https://api.aweber.com/1.0
                [accessTokenUrl] => https://auth.aweber.com/1.0/oauth/access_token
                [authorizeUrl] => https://auth.aweber.com/1.0/oauth/authorize
                [requestTokenUrl] => https://auth.aweber.com/1.0/oauth/request_token
            )

    )

[data] => Array
    (
        [total_unconfirmed_subscribers] => 0
        [total_subscribers_subscribed_yesterday] => 0
        [unique_list_id] => awlist3561167
        [http_etag] => "0f9b24fd3d578a7fa402bda6cf029732c2ae9dba-ca5feee2b7fbb6febfca8af5541541ea960aaedb"
        [web_form_split_tests_collection_link] => https://api.aweber.com/1.0/accounts/390249/lists/3561167/web_form_split_tests
        [subscribers_collection_link] => https://api.aweber.com/1.0/accounts/390249/lists/3561167/subscribers
        [total_subscribers_subscribed_today] => 0
        [id] => 3561167
        [total_subscribed_subscribers] => 519
        [total_unsubscribed_subscribers] => 22
        [campaigns_collection_link] => https://api.aweber.com/1.0/accounts/390249/lists/3561167/campaigns
        [custom_fields_collection_link] => https://api.aweber.com/1.0/accounts/390249/lists/3561167/custom_fields
        [self_link] => https://api.aweber.com/1.0/accounts/390249/lists/3561167
        [total_subscribers] => 541
        [resource_type_link] => https://api.aweber.com/1.0/#list
        [web_forms_collection_link] => https://api.aweber.com/1.0/accounts/390249/lists/3561167/web_forms
        [name] => 7affsubniche
    )

[_dynamicData] => Array
    (
    )

[url] => /accounts/390249/lists/3561167
)

Now when I use

echo $list->unique_list_id;

then it shows me correct output. But when I try

if(isset($list->unique_list_id)) {

} else {
        echo 'check 1';
}

then It always comes in else condition. Although unique_list_id is set in $list. I also tried with property_exists but it is also not working.

so my question is how to use isset with object data.

I see your unique_list_id is in data property. So you may check them with:

if(isset($list->data['unique_list_id'])) {
    // do something
} else {
    // do another one
}

I assume your object has a __get () method that's why your first call works. You need to implement a __isset () method as well

public function __isset($key) {
    return isset($this->data[$key]);
}