数组结构似乎忽略了第一个键 - 为什么?

时间:2017-01-15 22:48:13

标签: php

有人可以解释一下这里发生了什么吗?

我跑了这个:

$result = $client->getIdentityVerificationAttributes([
    'Identities' => $verifyemail
    ]);

仅供参考,这是一个亚马逊网络服务电话(如果您认为相关,请在此处获取更多信息:http://docs.aws.amazon.com/aws-sdk-php/v3/api/api-email-2010-12-01.html#verifyemailidentity

print_r结果如下所示:

Aws\Result Object
(
    [data:Aws\Result:private] => Array
        (
            [VerificationAttributes] => Array
                (
                    [warren@mydomain.com.au] => Array
                        (
                            [VerificationStatus] => Pending
                        )

                )

            [@metadata] => Array
                (
                    [statusCode] => 200
                    [effectiveUri] => https://email.us-west-2.amazonaws.com
                    [headers] => Array
                        (
                            [x-amzn-requestid] => 01ff8101-dae0-11e6-bbd2-856fb04f68c9
                            [content-type] => text/xml
                            [content-length] => 564
                            [date] => Sun, 15 Jan 2017 05:03:52 GMT
                        )

                    [transferStats] => Array
                        (
                            [http] => Array
                                (
                                    [0] => Array
                                        (
                                        )

                                )

                        )

                )

        )

)

请参阅VerificationStatus?这就是我想要的所以我的问题是:为什么我只能这样做:

$result['VerificationAttributes'][$verifyemail[0]]['VerificationStatus']

即,为什么第一个键(data:Aws\Result:private)被忽略 - 如果我将该键添加到上述路径,为什么才能获得验证状态???

0 个答案:

没有答案