note 94353 added to class.soapfault

From: Date: Thu, 29 Oct 2009 22:21:00 +0000
Subject: note 94353 added to class.soapfault
Groups: php.notes 
Request: Send a blank email to php-notes+get-162267@lists.php.net to get a copy of this message
You may use undocumented and invisible property $e->faultcode to access string version of $code. Because standard $e->getCode() does not work: $e = new SoapFault("test", "msg"); var_dump($e->getCode()); // prints "0" var_dump($e->faultCode); // prints "test" Also you may use namespaced fault codes: $e = new SoapFault(array("namespace", "test"), "msg"); - see ext/soap/soap.php, PHP_METHOD(SoapFault, SoapFault). To access the namespace, use $e->faultcodens ---- Server IP: 195.54.192.44 Probable Submitter: 91.77.158.103 ---- Manual Page -- http://www.php.net/manual/en/class.soapfault.php Edit -- https://master.php.net/note/edit/94353 Del: integrated -- https://master.php.net/note/delete/94353/integrated Del: useless -- https://master.php.net/note/delete/94353/useless Del: bad code -- https://master.php.net/note/delete/94353/bad+code Del: spam -- https://master.php.net/note/delete/94353/spam Del: non-english -- https://master.php.net/note/delete/94353/non-english Del: in docs -- https://master.php.net/note/delete/94353/in+docs Del: other reasons-- https://master.php.net/note/delete/94353 Reject -- https://master.php.net/note/reject/94353 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#162267) next »