ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilSoapHook.php
Go to the documentation of this file.
1 <?php
2 
7 class ilSoapHook
8 {
9 
13  protected $plugin_admin;
14 
19  {
20  $this->plugin_admin = $plugin_admin;
21  }
22 
28  public function getSoapMethods()
29  {
30  static $methods = null;
31  if ($methods !== null) {
32  return $methods;
33  }
34  $methods = array();
35  $plugin_names = $this->plugin_admin->getActivePluginsForSlot(IL_COMP_SERVICE, 'WebServices', 'soaphk');
36  foreach ($plugin_names as $plugin_name) {
38  $instance = ilPluginAdmin::getPluginObject(IL_COMP_SERVICE, 'WebServices', 'soaphk', $plugin_name);
39  foreach ($instance->getSoapMethods() as $method) {
40  $methods[] = $method;
41  }
42  }
43  return $methods;
44  }
45 
51  public function getWsdlTypes()
52  {
53  static $types = null;
54  if ($types !== null) {
55  return $types;
56  }
57  $types = array();
58  $plugin_names = $this->plugin_admin->getActivePluginsForSlot(IL_COMP_SERVICE, 'WebServices', 'soaphk');
59  foreach ($plugin_names as $plugin_name) {
61  $instance = ilPluginAdmin::getPluginObject(IL_COMP_SERVICE, 'WebServices', 'soaphk', $plugin_name);
62  foreach ($instance->getWsdlTypes() as $type) {
63  $types[] = $type;
64  }
65  }
66  return $types;
67  }
68 
69 
76  public function getMethodByName($name)
77  {
78  return array_pop(array_filter($this->getSoapMethods(), function ($method) use ($name) {
80  return ($method->getName() == $name);
81  }));
82  }
83 }
$type
Administration class for plugins.
Class ilSoapHook.
static getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get Plugin Object.
__construct(ilPluginAdmin $plugin_admin)
const IL_COMP_SERVICE