ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilSoapStructureObjectFactory Class Reference
+ Collaboration diagram for ilSoapStructureObjectFactory:

Public Member Functions

 getInstanceForObject ($object)
 
 getInstance ($objId, $type, $title, $description, $parentRefId)
 
 _getClassnameForType ($type)
 

Detailed Description

Definition at line 34 of file class.ilSoapStructureObjectFactory.php.

Member Function Documentation

◆ _getClassnameForType()

ilSoapStructureObjectFactory::_getClassnameForType (   $type)

Definition at line 67 of file class.ilSoapStructureObjectFactory.php.

References $type.

Referenced by getInstance(), and getInstanceForObject().

68  {
69  switch ($type) {
70  case "lm":
71  include_once "./webservice/soap/classes/class.ilSoapRepositoryStructureObject.php";
72  return "ilSoapRepositoryStructureObject";
73  case "st":
74  include_once "./webservice/soap/classes/class.ilSoapLMChapterStructureObject.php";
75  return "ilSoapLMChapterStructureObject";
76  case "pg":
77  include_once "./webservice/soap/classes/class.ilSoapLMPageStructureObject.php";
78  return "ilSoapLMPageStructureObject";
79  case "glo":
80  include_once "./webservice/soap/classes/class.ilSoapRepositoryStructureObject.php";
81  return "ilSoapRepositoryStructureObject";
82  case "git":
83  include_once "./webservice/soap/classes/class.ilSoapGLOTermStructureObject.php";
84  return "ilSoapGLOTermStructureObject";
85  case "gdf":
86  include_once "./webservice/soap/classes/class.ilSoapGLOTermDefinitionStructureObject.php";
87  return "ilSoapGLOTermDefinitionStructureObject";
88 
89 
90  }
91  return null;
92  }
$type
+ Here is the caller graph for this function:

◆ getInstance()

ilSoapStructureObjectFactory::getInstance (   $objId,
  $type,
  $title,
  $description,
  $parentRefId 
)

Definition at line 57 of file class.ilSoapStructureObjectFactory.php.

References $description, $title, $type, and _getClassnameForType().

Referenced by ilSoapGLOStructureReader\_parseStructure(), and ilSoapLMStructureReader\_parseStructure().

58  {
60  if ($classname == null) {
61  return null;
62  }
63 
64  return new $classname($objId, $type, $title, $description, $parentRefId);
65  }
$type
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getInstanceForObject()

ilSoapStructureObjectFactory::getInstanceForObject (   $object)

Definition at line 36 of file class.ilSoapStructureObjectFactory.php.

References _getClassnameForType().

Referenced by ilSoapStructureReader\__construct().

37  {
38  $classname = ilSoapStructureObjectFactory::_getClassnameForType($object->getType());
39 
40  if ($classname != null) {
41  switch ($object->getType()) {
42  case "lm":
43  case "glo":
44  return new $classname(
45  $object->getId(),
46  $object->getType(),
47  $object->getTitle(),
48  $object->getLongDescription(),
49  $object->getRefId()
50  );
51  break;
52  }
53  }
54  return null;
55  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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