ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilObjectFactoryWrapper.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
30{
31 public static ?ilObjectFactoryWrapper $instance = null;
32
33 public static function singleton(): ilObjectFactoryWrapper
34 {
35 if (self::$instance === null) {
36 self::$instance = new self();
37 }
38 return self::$instance;
39 }
40
41 public function getInstanceByRefId(int $ref_id, bool $stop_on_error = true): ?ilObject
42 {
43 return ilObjectFactory::getInstanceByRefId($ref_id, $stop_on_error);
44 }
45}
Class ilObjectFactoryWrapper.
getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
static ilObjectFactoryWrapper $instance
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
Class ilObject Basic functions for all objects.
$ref_id
Definition: ltiauth.php:66