ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilCourseParticipant.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=0);
25{
26 protected const COMPONENT_NAME = 'components/ILIAS/Course';
27
28 protected static array $instances = [];
29
33 protected function __construct(int $a_obj_id, int $a_usr_id)
34 {
35 $this->type = 'crs';
36
37 parent::__construct(self::COMPONENT_NAME, $a_obj_id, $a_usr_id);
38 }
39
40 public static function _getInstanceByObjId(int $a_obj_id, int $a_usr_id): ilCourseParticipant
41 {
42 if (isset(self::$instances[$a_obj_id][$a_usr_id]) && self::$instances[$a_obj_id][$a_usr_id]) {
43 return self::$instances[$a_obj_id][$a_usr_id];
44 }
45 return self::$instances[$a_obj_id][$a_usr_id] = new ilCourseParticipant($a_obj_id, $a_usr_id);
46 }
47}
static _getInstanceByObjId(int $a_obj_id, int $a_usr_id)
__construct(int $a_obj_id, int $a_usr_id)
Base class for course and group participant.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc