19declare(strict_types=1);
27 private string $namespace,
28 private bool $use_dotnet =
false,
37 $service_namespace = $this->namespace !==
'' ? $this->namespace : $this->location;
39 $soap_client = new \SoapClient(
null, [
40 'location' => $this->location,
41 'uri' => $service_namespace,
45 'use' => SOAP_ENCODED,
48 $call_options = [
'uri' => $service_namespace];
49 if ($this->use_dotnet) {
50 $call_options[
'soapaction'] = $service_namespace .
'/isValidSession';
53 $valid = $soap_client->__soapCall(
61 (
string) $soap_client->__getLastRequest(),
62 (
string) $soap_client->__getLastResponse(),
72 if ($this->use_dotnet) {
74 new \SoapParam(
$ext_uid,
'ns1:ext_uid'),
75 new \SoapParam(
$soap_pw,
'ns1:soap_pw'),
76 new \SoapParam(
$new_user,
'ns1:new_user'),
92 if (\is_object($valid)) {
93 $valid = (array) $valid;
96 if (!\is_array($valid)) {
97 return [
'valid' =>
false];
__construct(private string $location, private string $namespace, private bool $use_dotnet=false,)
normalizeValidationResult(mixed $valid)
validateSession(string $ext_uid, string $soap_pw, bool $new_user,)
buildCallParameters(string $ext_uid, string $soap_pw, bool $new_user)
Mirrors legacy nusoap_client::call() parameter naming (ns1: prefix in .NET mode).
@phpstan-type ValidationArray array{valid: bool, firstname?: string, lastname?: string,...