note 110401 added to soapclient.soapcall

From: Date: Thu, 18 Oct 2012 15:47:02 +0000
Subject: note 110401 added to soapclient.soapcall
Groups: php.notes 
Request: Send a blank email to php-notes+get-191425@lists.php.net to get a copy of this message
If you're using a custom class object as a parameter (or nested within your parameters), and you store your data in a $_data[] attribute variable, you need to implement the __get($key) method in that custom class, or your data won't translate/convert into the XML. class ColorParam { private $_data = array(); __get($key) { return $_data[$key]; } public function setBackground($data) { $this-_data['background'] = $data; } } $client = new SoapClient(); $colorParam= new ColorParam(); $colorParam->setBackground('blue'); $client->sampleImageCall($colorParam); ---- Server IP: 69.147.83.199 Probable Submitter: 204.62.150.2 ---- Manual Page -- http://www.php.net/manual/en/soapclient.soapcall.php Edit -- https://master.php.net/note/edit/110401 Del: integrated -- https://master.php.net/note/delete/110401/integrated Del: useless -- https://master.php.net/note/delete/110401/useless Del: bad code -- https://master.php.net/note/delete/110401/bad+code Del: spam -- https://master.php.net/note/delete/110401/spam Del: non-english -- https://master.php.net/note/delete/110401/non-english Del: in docs -- https://master.php.net/note/delete/110401/in+docs Del: other reasons-- https://master.php.net/note/delete/110401 Reject -- https://master.php.net/note/reject/110401 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#191425) next »