ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
Services.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
28 
29 class Services implements ServicesInterface
30 {
31  protected Container $dic;
32 
33  public function __construct()
34  {
35  global $DIC;
36 
37  $this->dic = $DIC;
38  }
39 
40  public function forObject(
41  string $type,
42  int $ref_id,
43  string $sub_type = '',
44  int $sub_id = 0
45  ): ObjectModesInterface {
46  return new ObjectModes(
47  $this->dic,
48  $type,
49  $ref_id,
50  $sub_type,
51  $sub_id
52  );
53  }
54 
55  public function forSubObjects(
56  string $type,
57  int $ref_id,
58  string ...$sub_types
59  ): SubObjectModesInterface {
60  return new SubObjectModes(
61  $this->dic,
62  $type,
63  $ref_id,
64  ...$sub_types
65  );
66  }
67 
68  public function getSubObjectID(
69  int $obj_id,
70  int $sub_id,
71  string $sub_type
73  return new SubObjectID($obj_id, $sub_id, $sub_type);
74  }
75 }
getSubObjectID(int $obj_id, int $sub_id, string $sub_type)
Definition: Services.php:68
forObject(string $type, int $ref_id, string $sub_type='', int $sub_id=0)
Definition: Services.php:40
$ref_id
Definition: ltiauth.php:65
global $DIC
Definition: shib_login.php:22
forSubObjects(string $type, int $ref_id, string ... $sub_types)
Definition: Services.php:55