我正在尝试访问使用PHP SoapClient访问的WSDL api结果中保存的照片。我需要在[MediaCategory]为“原始”的情况下在MultimediaDescriptions的ImageItem中列出所有照片URL。格式如下。
我可以连接到WSDL,并通过$ result-> UnitInfo-> Descriptions-> MultimediaDescriptions-> MultimediaDescription访问单元阵列。但是,我一直在努力获取图像URL列表。我不断收到“无法将stdClass类型的对象用作数组”的错误消息
stdClass Object
(
[UnitInfo] => stdClass Object
(
[Descriptions] => stdClass Object
(
[MultimediaDescriptions] => stdClass Object
(
[MultimediaDescription] => Array
(
[0] => stdClass Object
(
[ImageItems] => stdClass Object
(
[ImageItem] => Array
(
[0] => stdClass Object
(
[ImageFormat] => Array
(
[0] => stdClass Object
(
[URL] => https://pictures.escapia.com/WaikoloaVR/16649/3417200176.jpeg
[UnitOfMeasureCode] => 9
[Width] => 640
[Height] => 425
[Title] => -Original
[FileName] => 3417200176.jpeg
[DimensionCategory] => Original
)
[1] => stdClass Object
(
[URL] => https://pictures.escapia.com/WaikoloaVR/16649/1681940176.jpg
[UnitOfMeasureCode] => 9
[Width] => 100
[Height] => 71
[Title] => -Thumbnail
[FileName] => 1681940176.jpg
[DimensionCategory] => Thumbnail
)
[2] => stdClass Object
(
[URL] => https://pictures.escapia.com/WaikoloaVR/16649/4190190176.jpg
[UnitOfMeasureCode] => 9
[Width] => 350
[Height] => 250
[Title] => -Standard
[FileName] => 4190190176.jpg
[DimensionCategory] => Standard
)
[3] => stdClass Object
(
[URL] => https://pictures.escapia.com/WaikoloaVR/16649/9730080176.jpg
[UnitOfMeasureCode] => 9
[Width] => 300
[Height] => 214
[Title] => -Descriptive
[FileName] => 9730080176.jpg
[DimensionCategory] => Descriptive
)
[4] => stdClass Object
(
[URL] => https://pictures.escapia.com/WaikoloaVR/16649/1399320176.jpg
[UnitOfMeasureCode] => 9
[Width] => 640
[Height] => 457
[Title] => -Large
[FileName] => 1399320176.jpg
[DimensionCategory] => Large
)
)
[Description] => stdClass Object
(
[_] =>
[Caption] =>
)
[Category] => Exterior
[Removal] =>
[IsDefault] => 1
)
[1] => stdClass Object
(
[ImageFormat] => Array
(
[0] => stdClass Object
(
[URL] => https://pictures.escapia.com/WaikoloaVR/16649/0875930328.jpeg
[UnitOfMeasureCode] => 9
[Width] => 1024
[Height] => 768
[Title] => -Original
[FileName] => 0875930328.jpeg
[DimensionCategory] => Original
)
[1] => stdClass Object
(
[URL] => https://pictures.escapia.com/WaikoloaVR/16649/1300260328.jpg
[UnitOfMeasureCode] => 9
[Width] => 100
[Height] => 71
[Title] => -Thumbnail
[FileName] => 1300260328.jpg
[DimensionCategory] => Thumbnail
)
[2] => stdClass Object
(
[URL] => https://pictures.escapia.com/WaikoloaVR/16649/5236970328.jpg
[UnitOfMeasureCode] => 9
[Width] => 350
[Height] => 250
[Title] => -Standard
[FileName] => 5236970328.jpg
[DimensionCategory] => Standard
)
[3] => stdClass Object
(
[URL] => https://pictures.escapia.com/WaikoloaVR/16649/5760350328.jpg
[UnitOfMeasureCode] => 9
[Width] => 300
[Height] => 214
[Title] => -Descriptive
[FileName] => 5760350328.jpg
[DimensionCategory] => Descriptive
)
[4] => stdClass Object
(
[URL] => https://pictures.escapia.com/WaikoloaVR/16649/7745220328.jpg
[UnitOfMeasureCode] => 9
[Width] => 640
[Height] => 457
[Title] => -Large
[FileName] => 7745220328.jpg
[DimensionCategory] => Large
)
)
[Description] => stdClass Object
(
[_] =>
[Caption] =>
)
[Category] => Exterior
[Removal] =>
[IsDefault] =>
)
[2] => stdClass Object
(
[ImageFormat] => Array
(
[0] => stdClass Object
(
[URL] => https://pictures.escapia.com/WaikoloaVR/16649/0875930327.jpeg
[UnitOfMeasureCode] => 9
[Width] => 1024
[Height] => 768
[Title] => -Original
[FileName] => 0875930327.jpeg
[DimensionCategory] => Original
)
[1] => stdClass Object
(
[URL] => https://pictures.escapia.com/WaikoloaVR/16649/0187440327.jpg
[UnitOfMeasureCode] => 9
[Width] => 100
[Height] => 71
[Title] => -Thumbnail
[FileName] => 0187440327.jpg
[DimensionCategory] => Thumbnail
)
[2] => stdClass Object
(
[URL] => https://pictures.escapia.com/WaikoloaVR/16649/5760350327.jpg
[UnitOfMeasureCode] => 9
[Width] => 350
[Height] => 250
[Title] => -Standard
[FileName] => 5760350327.jpg
[DimensionCategory] => Standard
)
[3] => stdClass Object
(
[URL] => https://pictures.escapia.com/WaikoloaVR/16649/1300260327.jpg
[UnitOfMeasureCode] => 9
[Width] => 300
[Height] => 214
[Title] => -Descriptive
[FileName] => 1300260327.jpg
[DimensionCategory] => Descriptive
)
[4] => stdClass Object
(
[URL] => https://pictures.escapia.com/WaikoloaVR/16649/5236970327.jpg
[UnitOfMeasureCode] => 9
[Width] => 640
[Height] => 457
[Title] => -Large
[FileName] => 5236970327.jpg
[DimensionCategory] => Large
)
)
[Description] => stdClass Object
(
[_] =>
[Caption] =>
)
[Category] => Exterior
[Removal] =>
[IsDefault] =>
)
)
)
)
[1] => stdClass Object
(
[TextItems] => stdClass Object
(
[TextItem] => Array
(
[0] => stdClass Object
(
[Description] => stdClass Object
(
[_] => Bacon ipsum dolor sit amet flank commodo turducken, dolore fugiat sausage aliquip chicken cupidatat ut. Short ribs dolore chicken ground round, incididunt frankfurter meatball. Boudin reprehenderit bresaola spare ribs pork chop kielbasa. Hamburger kielbasa pancetta labore tri-tip.
)
[Title] => Long Description
[Removal] =>
)
[1] => stdClass Object
(
[Description] => stdClass Object
(
[_] =>
)
[Title] => Driving Directions
[Removal] =>
)
[2] => stdClass Object
(
[Description] => stdClass Object
(
[_] =>
)
[Title] => Room Description
[Removal] =>
)
)
)
)
[2] => stdClass Object
(
[VideoItems] => stdClass Object
(
[VideoItem] => stdClass Object
(
[VideoFormat] => stdClass Object
(
[URL] => <iframe width="650" height="365" src="https://my.matterport.com/show/?m=aSx1MpRRqif" frameborder="0" allowfullscreen></iframe>
)
[Removal] =>
)
)
)
)
)
[DescriptiveText] => Pig velit bresaola, sirloin turkey laborum shoulder ut. T-bone labore est nostrud, dolore eiusmod prosciutto.
[RateNotes] => 3 night minimum (always).
)
etc....