3 declare(strict_types=1);
    37         $this->instances = array();
    42         if (self::$instance === null) {
    45         return self::$instance;
    54         if (!array_key_exists($ref_id, $this->instances)) {
    56             if ($type === 
'prg') {
    59             if ($type === 
'prgr') {
    61                 $this->instances[
$ref_id] = $prg_reference->getReferencedObject();
    63             if ($type !== 
'prgr' && $type !== 
'prg') {
    64                 throw new \Exception(
'invalid ref_id: ' . $ref_id);
    67         return $this->instances[
$ref_id];
    73             throw new ilException(
"ilObjStudyProgrammeCache::addInstance: Can't add instance without ref_id.");
    75         $this->instances[$prg->
getRefId()] = $prg;
    85         $this->instances = array();
    90         return count($this->instances) === 0;
 
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...
 
static ilObjStudyProgrammeCache $instance
 
getInstanceByRefId(int $ref_id)
 
addInstance(ilObjStudyProgramme $prg)
 
test_clear()
For testing purpose. 
 
static _lookupType(int $id, bool $reference=false)