ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilObjectFactoryWrapper Class Reference

Class ilObjectFactoryWrapper. More...

+ Collaboration diagram for ilObjectFactoryWrapper:

Public Member Functions

 getInstanceByRefId (int $ref_id, bool $stop_on_error=true)
 

Static Public Member Functions

static singleton ()
 

Static Public Attributes

static ilObjectFactoryWrapper $instance = null
 

Detailed Description

Class ilObjectFactoryWrapper.

Wraps around static class ilObjectFactory to make the object factory exchangeable in ilObjStudyProgramm for testing purpose.

Author
: Richard Klees richa.nosp@m.rd.k.nosp@m.lees@.nosp@m.conc.nosp@m.epts-.nosp@m.and-.nosp@m.train.nosp@m.ing..nosp@m.de

Definition at line 29 of file class.ilObjectFactoryWrapper.php.

Member Function Documentation

◆ getInstanceByRefId()

ilObjectFactoryWrapper::getInstanceByRefId ( int  $ref_id,
bool  $stop_on_error = true 
)

Definition at line 41 of file class.ilObjectFactoryWrapper.php.

41 : ?ilObject
42 {
43 return ilObjectFactory::getInstanceByRefId($ref_id, $stop_on_error);
44 }
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

References $ref_id, and ilObjectFactory\getInstanceByRefId().

+ Here is the call graph for this function:

◆ singleton()

static ilObjectFactoryWrapper::singleton ( )
static

Definition at line 33 of file class.ilObjectFactoryWrapper.php.

34 {
35 if (self::$instance === null) {
36 self::$instance = new self();
37 }
38 return self::$instance;
39 }
Class ilObjectFactoryWrapper.
static ilObjectFactoryWrapper $instance

References $instance.

Referenced by ilObjStudyProgramme\__construct().

+ Here is the caller graph for this function:

Field Documentation

◆ $instance

ilObjectFactoryWrapper ilObjectFactoryWrapper::$instance = null
static

Definition at line 31 of file class.ilObjectFactoryWrapper.php.

Referenced by singleton().


The documentation for this class was generated from the following file: