I am trying to access photos held in a result from a WSDL api that is accessed using the PHP SoapClient. I need to list all photo URLs in the ImageItems of the MultimediaDescriptions with the [DimensionCategory] of "Original". The format is below.
I can connect to the WSDL fine and access the unit array via $result->UnitInfo->Descriptions->MultimediaDescriptions->MultimediaDescription. However, I am struggling to work my way down to get a list of the image URLs. I keep getting errors along the lines of "Cannot use object of type stdClass as array"
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....