Soap server with attachments refactoring

This commit is contained in:
Petr Bechyně
2016-11-08 15:42:52 +01:00
parent 8d033f9afc
commit 84c37b1d24
23 changed files with 511 additions and 502 deletions

View File

@ -2,6 +2,8 @@
namespace BeSimple\SoapServer\SoapOptions;
use Exception;
class SoapServerOptions
{
const SOAP_SERVER_PERSISTENCE_NONE = 0;
@ -43,6 +45,22 @@ class SoapServerOptions
$this->persistence = $persistence;
}
public function getHandler()
{
if ($this->hasHandlerObject()) {
return $this->getHandlerObject();
} else if ($this->hasHandlerClass()) {
return $this->getHandlerClass();
} else {
throw new Exception('No HandlerClass or HandlerObject set');
}
}
public function hasHandlerClass()
{
return $this->handlerClass !== null;