1

如何从这个 PHP 对象中获取 VerificationStatus?

    Guzzle\Service\Resource\Model Object
    (
        [structure:protected] => 
        [data:protected] => Array
            (
                [VerificationAttributes] => Array
                    (
                        [user@gmail.com] => Array
                            (
                                [VerificationStatus] => Success
                            )

                    )

                [ResponseMetadata] => Array
                    (
                        [RequestId] => csdgdf62-fdsg-dfgdf-23-bf91f933ab69
                    )

            )

    )
4

1 回答 1

2

我在 Amazon SES 文档中找到了答案:

当使用以下方式访问数据时:

$result = $client->getIdentityVerificationAttributes(array(
    // Identities is required
    'Identities' => array($email)
));

您可以通过以下方式访问 VerificationStatus:

$result['VerificationAttributes'][$email]['VerificationStatus']

因此检查它:

if($result['VerificationAttributes'][$email]['VerificationStatus']=='Success'){
    // verification status was successful
}
于 2013-10-14T19:59:42.807 回答