ILIAS  release_8 Revision v8.24
class.ilSoapHook.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
10{
12
14 {
15 $this->component_factory = $component_factory;
16 }
17
23 public function getSoapMethods(): array
24 {
25 static $methods = null;
26 if ($methods !== null) {
27 return $methods;
28 }
29 $methods = array();
30 foreach ($this->component_factory->getActivePluginsInSlot('soaphk') as $plugin) {
31 foreach ($plugin->getSoapMethods() as $method) {
32 $methods[] = $method;
33 }
34 }
35 return $methods;
36 }
37
43 public function getWsdlTypes(): array
44 {
45 static $types = null;
46 if ($types !== null) {
47 return $types;
48 }
49 $types = array();
50 foreach ($this->component_factory->getActivePluginsInSlot('soaphk') as $plugin) {
51 foreach ($plugin->getWsdlTypes() as $type) {
52 $types[] = $type;
53 }
54 }
55 return $types;
56 }
57
58
65 public function getMethodByName(string $name): ?ilSoapMethod
66 {
67 $array = array_filter($this->getSoapMethods(), static function (ilSoapMethod $method) use ($name) {
68 return ($method->getName() === $name);
69 });
70 return array_pop($array);
71 }
72}
Class ilSoapHook.
getSoapMethods()
Get all registered soap methods over all SOAP plugins.
ilComponentFactory $component_factory
__construct(ilComponentFactory $component_factory)
getWsdlTypes()
Get all registered WSDL types over all SOAP plugins.
getMethodByName(string $name)
Get a registered soap method by name.
Interface ilSoapMethod.
getName()
Get the name of the method.
if($format !==null) $name
Definition: metadata.php:247
$type