From: e dot sand at elisand dot com Operating system: Irrelevant PHP version: 5.2.9 PHP Bug Type: Feature/Change Request Bug description: SoapServer::addClass() and/or changes to addFunction()
Description: ------------ It is currently impossible (so it seems) to *add* a class of functions to SoapServer for handling. The call to setClass() or setObject() overwrite the entire exported function list, so if you wish to try and add multiple classes containing functions to the SoapServer, it is not possible. Introducing a new addClass() (I don't think exporting multiple objects through a new addObject() call would make viable sense though) that would allow *appending* additional functions to the exported function list for SoapServer would resolve this problem. Additionally or alternatively, addFunction() could be modified to allow accessing class functions as well. Currently it is impossible to export any class functions to the SoapServer by using addFunction(). Reproduce code: --------------- class SOAPMethods { public static function fun() {...} } $server = New SoapServer(...); $server->setObject($myobject); // this overwrites the exporting of $myobject above. $server->setClass('SOAPMethods'); // this method also doesn't work (should, as of PHP5.2.3) $server->addFunction('SOAPMethods::setQuantity'); // neither does this syntax for accessing class functions $server->addFunction(array('SOAPMethods', 'setQuantity')); // neither does this syntax for accessing class functions $methods = new SOAPMethods; $server->addFunction(array(&$methods, 'setQuantity')); -- Edit bug report at http://bugs.php.net/?id=47919&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47919&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47919&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47919&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=47919&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47919&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=47919&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=47919&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=47919&r=needscript Try newer version: http://bugs.php.net/fix.php?id=47919&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=47919&r=support Expected behavior: http://bugs.php.net/fix.php?id=47919&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=47919&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=47919&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=47919&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47919&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=47919&r=dst IIS Stability: http://bugs.php.net/fix.php?id=47919&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=47919&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=47919&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=47919&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=47919&r=mysqlcfg