Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/295.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/linq/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 使用smsgateway结果对象_Php_Sms Gateway - Fatal编程技术网

Php 使用smsgateway结果对象

Php 使用smsgateway结果对象,php,sms-gateway,Php,Sms Gateway,我正在关注这个链接 并获得成功的回应。但无法获取结果对象->id。示例结果对象如下所示 SMSGatewayMe\Client\Model\Device Object ( [id:protected] => 1 [name:protected] => Device Name [attributes:protected] => SMSGatewayMe\Client\Model\DeviceAttributes Object ( [phoneNumber:

我正在关注这个链接

并获得成功的回应。但无法获取结果对象->id。示例结果对象如下所示

SMSGatewayMe\Client\Model\Device Object
(
[id:protected] => 1
[name:protected] => Device Name
[attributes:protected] => SMSGatewayMe\Client\Model\DeviceAttributes Object
    (
        [phoneNumber:protected] => 07791064781
        [make:protected] => samsung
        [model:protected] => SM-G965F
        [provider:protected] => EE
        [country:protected] => gb
        [connectionType:protected] => 4G
        [battery:protected] => 43
        [signalPercent:protected] =>
        [wifi:protected] =>
        [lat:protected] => 52.6076925
        [lng:protected] => -0.2046643
        [lastSeen:protected] => DateTime Object
            (
                [date] => 2018-05-14 17:36:20.000000
                [timezone_type] => 1
                [timezone] => +00:00
            )

    )

)

提前感谢

从lib中可以看到,您需要调用getId

$device->getId();
对于属性的其余部分,使用getPropertyName