【发布时间】:2019-12-12 00:42:57
【问题描述】:
我觉得有点傻,但我不知道如何解析谷歌从他们的 API 中返回的对象 PHP,有人能解释一下吗?
例如,如果我要求:
print_r($job->getState());
我明白了:
Google\Cloud\Scheduler\V1\HttpTarget Object
(
[uri:Google\Cloud\Scheduler\V1\HttpTarget:private] => http://example.com/cron-check.php
[http_method:Google\Cloud\Scheduler\V1\HttpTarget:private] => 1
[headers:Google\Cloud\Scheduler\V1\HttpTarget:private] => Google\Protobuf\Internal\MapField Object...
那么我到底如何从这个对象中获取 uri 值呢?
【问题讨论】:
标签: php google-cloud-platform google-api google-cloud-functions