ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilService Class Reference

ILIAS Service (A service provides cross-sectional functionalities, used by other components) More...

+ Inheritance diagram for ilService:
+ Collaboration diagram for ilService:

Public Member Functions

 getComponentType ()
 
 getName ()
 Get Name. More...
 
- Public Member Functions inherited from ilComponent
 getVersion ()
 Get Version Number of Component. More...
 
 isCore ()
 
 getComponentType ()
 
 getName ()
 Get Name. More...
 
 __construct ()
 
 setId ($a_id)
 Set Id. More...
 
 getId ()
 Get Id. More...
 
 setPluginSlots ($a_pluginslots)
 Set Plugin Slots. More...
 
 getPluginSlots ()
 Get Plugin Slots. More...
 
 setSubDirectory ($a_subdirectory)
 Set Sub Directory. More...
 
 getSubDirectory ()
 Get Sub Directory. More...
 
 getPluginSlotName ($a_id)
 Get name of plugin slot. More...
 
 getPluginSlotDirectory ($a_id)
 Get directory of plugin slot. More...
 
 getPluginSlotLanguagePrefix ($a_id)
 Get language prefix for plugin slot. More...
 

Static Public Member Functions

static getAvailableCoreServices ()
 Get all available core services. More...
 
- Static Public Member Functions inherited from ilComponent
static getComponentObject ($a_ctype, $a_cname)
 Get component object. More...
 
static lookupPluginSlots ($a_type, $a_name)
 Lookup all plugin slots of a component. More...
 
static lookupId ($a_type, $a_name)
 Lookup ID of a component. More...
 
static getComponentInfo ($a_type, $a_name)
 
static checkVersionNumber ($a_ver)
 Check version number. More...
 
static isVersionGreaterString ($a_ver1, $a_ver2)
 
static isVersionGreater (string $version1, string $version2)
 
static lookupComponentName ($a_component_id)
 lookup component name type $ilDB More...
 
static getAll ()
 Get all. More...
 

Additional Inherited Members

- Protected Attributes inherited from ilComponent
 $global_cache
 

Detailed Description

ILIAS Service (A service provides cross-sectional functionalities, used by other components)

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 36 of file class.ilService.php.

Member Function Documentation

◆ getAvailableCoreServices()

static ilService::getAvailableCoreServices ( )
staticfinal

Get all available core services.

Core services are located in the main ILIAS/Services folder and provide a service.xml file that includes information about the service. (please note that currently only a few services provide a service.xml file)

Returns
array array of services (assoc array, "name", "dir")

Definition at line 67 of file class.ilService.php.

Referenced by ilComponentsTableGUI\getComponents(), ilPluginsOverviewTableGUI\getServicesCoreItems(), ilDBUpdate\loadXMLInfo(), and ilSetupGUI\reloadControlStructure().

68  {
69  $services_dir = ILIAS_ABSOLUTE_PATH . "/Services";
70 
71  if (!@is_dir($services_dir)) {
72  return array();
73  }
74 
75  // read current directory
76  $dir = opendir($services_dir);
77 
78  $services = array();
79  while ($file = readdir($dir)) {
80  if ($file != "." and
81  $file != "..") {
82  // directories
83  if (@is_dir($services_dir . "/" . $file)) {
84  if (@is_file($services_dir . "/" . $file . "/service.xml")) {
85  $services[] = array("subdir" => $file);
86  }
87  }
88  }
89  }
90  return $services;
91  }
+ Here is the caller graph for this function:

◆ getComponentType()

ilService::getComponentType ( )
final

Definition at line 41 of file class.ilService.php.

References IL_COMP_SERVICE.

41  : string
42  {
43  return IL_COMP_SERVICE;
44  }
const IL_COMP_SERVICE

◆ getName()

ilService::getName ( )
final

Get Name.

Returns
string Name

Definition at line 51 of file class.ilService.php.

52  {
53  // class is always il<ModuleName>Service
54  $class = get_class($this);
55 
56  return substr($class, 2, strlen($class) - 9);
57  }

The documentation for this class was generated from the following file: