19declare(strict_types=1);
44 public function __soapCall(
string $function_name, array $arguments): array
47 throw new \SoapFault(
'SOAP-ENV:Server',
"Procedure '$function_name' not present");
50 return $this->invokeIsValidSession($arguments);
55 if (str_contains($name,
':')) {
56 return substr($name, strrpos($name,
':') + 1);
66 private function invokeIsValidSession(array $arguments): array
68 if (\count($arguments) === 1) {
69 $first = $arguments[0];
70 if (\is_object($first)) {
72 $arguments = (array) $first;
73 } elseif (\is_array($first)) {
82 $parameters[
'ext_uid'],
83 $parameters[
'soap_pw'],
84 $parameters[
'new_user']
95 foreach ($arguments as $key => $value) {
96 if (!\is_string($key)) {
102 if ($normalized !== []) {
104 'ext_uid' => (string) ($normalized[
'ext_uid'] ??
''),
105 'soap_pw' => (string) ($normalized[
'soap_pw'] ??
''),
106 'new_user' => (bool) ($normalized[
'new_user'] ??
false),
111 'ext_uid' => (string) ($arguments[0] ??
''),
112 'soap_pw' => (string) ($arguments[1] ??
''),
113 'new_user' => (bool) ($arguments[2] ??
false),
130 $result[
'firstname'] =
'first ' .
$ext_uid;
131 $result[
'lastname'] =
'last ' .
$ext_uid;
132 $result[
'email'] =
$ext_uid .
'@de.de';
@phpstan-type ValidationResult array{firstname: string, lastname: string, email: string,...
normalizeParameterKeys(array $arguments)
isValidSession(string $ext_uid, string $soap_pw, bool $new_user)
buildValidationResult(string $ext_uid, string $soap_pw, bool $new_user)
__soapCall(string $function_name, array $arguments)
localOperationName(string $name)