PHP 8.6.0 Alpha 2 available for testing

Voting

: min(one, zero)?
(Example: nine)

The Note You're Voting On

boogiebug at gmail dot com
18 years ago
setPersistence works only for a single instance of service class.
To use multiple instance of services objects, you need to instantiate the classes into objects and use an undocumented SoapServer's method - setObject() to add the service object into the SoapServer object, and handle the service object persistence with $_SESSION instead.
For example:
$ServiceObjects = array()
$ServiceObjects[0] = new ServiceClass1();
$ServiceObjects[1] = new ServiceClass2();
$ServiceObjects[2] = new ServiceClass3();
$_SESSION['ServiceClass1'] = $ServiceObjects[0];
$_SESSION['ServiceClass2'] = $ServiceObjects[1];
$_SESSION['ServiceClass3'] = $ServiceObjects[2];
...
$Servers = array()
for ( $i = 0; $i < count($ServiceObjects); i++)
{
 $s = new SoapServer($wsdl);
 $s->setObject($ServiceObject[$i]);
 $Servers[] = $s;
}
...
$Server[$i]->handle()
...

<< Back to user notes page

AltStyle によって変換されたページ (->オリジナル) /