ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilObjectFactoryWrapperMock Class Reference

Mock for object factory. More...

+ Inheritance diagram for ilObjectFactoryWrapperMock:
+ Collaboration diagram for ilObjectFactoryWrapperMock:

Public Member Functions

 getInstanceByRefId ($a_ref_id, $stop_on_error=true)
 
- Public Member Functions inherited from ilObjectFactoryWrapper
 getInstanceByRefId ($a_ref_id, $stop_on_error=true)
 

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectFactoryWrapper
static singleton ()
 
- Static Public Attributes inherited from ilObjectFactoryWrapper
static $instance = null
 

Detailed Description

Mock for object factory.

Definition at line 68 of file mocks.php.

Member Function Documentation

◆ getInstanceByRefId()

ilObjectFactoryWrapperMock::getInstanceByRefId (   $a_ref_id,
  $stop_on_error = true 
)

Definition at line 70 of file mocks.php.

References ilObject\_lookupType(), and ilObjectFactoryWrapper\singleton().

71  {
72  if (ilObject::_lookupType($a_ref_id, true) == "mock") {
73  return new ilStudyProgrammeLeafMock($a_ref_id);
74  }
75  return ilObjectFactoryWrapper::singleton()->getInstanceByRefId($a_ref_id, $stop_on_error);
76  }
Mock classes for tests.
Definition: mocks.php:20
static _lookupType($a_id, $a_reference=false)
lookup object type
+ Here is the call graph for this function:

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