|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-12-30 22:46 UTC] cmb@php.net
-Package: Feature/Change Request
+Package: SOAP related
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 14:00:01 2025 UTC |
Description: ------------ I would like to be able to intercept the SoapServer when it is about to call an assigned function/method to handle a request. This would allow people to check methods before they are run and could then, for example, check that that the request service is currently enabled/active and if not throw a SoapFault which would then be sent as the soap responce for that method. If no SoapFault was thrown then it would carry and run the request as normal. An example follows. Reproduce code: --------------- <?php class NewSoapServer extends SoapServer { /** * @desc Overload SoapServer onServerRequest method * @return void * * Check to make sure that the requested service is * not disabled. If the service is disabled then a * SoapFaule will be thrown. */ function onServerRequest ($name, $args) { if(Application::isServiceDisabled($name)){ throw new SoapFault("Server","The '".$name."' service is currently disabled."); } } } ?>