ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 61 of file class.ilSoapStructureObjectFactory.php.

Referenced by getInstance(), and getInstanceForObject().

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

◆ getInstance()

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

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

References $title, and _getClassnameForType().

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

53  {
55  if ($classname == null)
56  return null;
57 
58  return new $classname($objId, $type, $title, $description, $parentRefId);
59  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getInstanceForObject()

ilSoapStructureObjectFactory::getInstanceForObject (   $object)

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

References _getClassnameForType().

Referenced by ilSoapStructureReader\__construct().

36  {
37  $classname = ilSoapStructureObjectFactory::_getClassnameForType ($object->getType());
38 
39  if ($classname != null)
40  switch ($object->getType())
41  {
42  case "lm":
43  case "glo":
44  return new $classname(
45  $object->getId(), $object->getType(), $object->getTitle(),
46  $object->getLongDescription(), $object->getRefId());
47  break;
48  }
49  return null;
50  }
+ 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: