Menu

Commit [r246]  Maximize  Restore  History

[UPDATE] minor generated setter improvement

When a struct contains properties with invalid names (such as "my-property"), the setter is named setMy_property but the property which is set is $this->{'my-property'} so when the object is sent to the SoapClient, this is the right value that is used. When we use var_export, then the property is exported as "my-property" but the __set_state() method, called in the WsdlClass when loading the exported object, only considers valid attribute names to call the setter. To fix this issue, we then also set the valid attribute name $this->my_property in the setMy_property() method, the setter. So the setter method, setMy_property() is called accordingly to the attribute name when the __set_state() method is called and everything goes well!

mikaelcom 2013-07-31

changed /trunk/WsdlToPhpStructAttribute.php
/trunk/WsdlToPhpStructAttribute.php Diff Switch to side-by-side view
Loading...
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.