ILIAS  release_8 Revision v8.24
class.ilLuceneSubItemListGUIFactory.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
27{
28 private static array $instances = [];
29
33 public static function getInstanceByType(string $a_type, object $a_cmd_class): ilSubItemListGUI
34 {
35 global $DIC;
36
37 $objDefinition = $DIC['objDefinition'];
38
39 if (isset(self::$instances[$a_type])) {
40 return self::$instances[$a_type];
41 }
42
43 $class = $objDefinition->getClassName($a_type);
44 $location = $objDefinition->getLocation($a_type);
45 $full_class = "ilObj" . $class . "SubItemListGUI";
46 if (@include_once($location . "/class." . $full_class . ".php")) {
47 return self::$instances[$a_type] = new $full_class(get_class($a_cmd_class));
48 } else {
49 return self::$instances[$a_type] = new ilObjectSubItemListGUI(get_class($a_cmd_class));
50 }
51 }
52}
$location
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: buildRTE.php:22
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getInstanceByType(string $a_type, object $a_cmd_class)
get instance by type
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: feed.php:28