ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilSoapHook.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
9 class ilSoapHook
10 {
12 
13  public function __construct(ilComponentFactory $component_factory)
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 }
getName()
Get the name of the method.
$type
if($format !==null) $name
Definition: metadata.php:247
getSoapMethods()
Get all registered soap methods over all SOAP plugins.
Class ilSoapHook.
__construct(ilComponentFactory $component_factory)
getWsdlTypes()
Get all registered WSDL types over all SOAP plugins.
getMethodByName(string $name)
Get a registered soap method by name.
ilComponentFactory $component_factory