ILIAS  release_8 Revision v8.24
ilSoapStructureObjectFactory Class Reference
+ Collaboration diagram for ilSoapStructureObjectFactory:

Public Member Functions

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

Detailed Description

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

Member Function Documentation

◆ _getClassnameForType()

ilSoapStructureObjectFactory::_getClassnameForType ( string  $type)

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

67 : ?string
68 {
69 switch ($type) {
70 case "glo":
71 case "lm":
72 include_once "./webservice/soap/classes/class.ilSoapRepositoryStructureObject.php";
73 return "ilSoapRepositoryStructureObject";
74 case "st":
75 include_once "./webservice/soap/classes/class.ilSoapLMChapterStructureObject.php";
76 return "ilSoapLMChapterStructureObject";
77 case "pg":
78 include_once "./webservice/soap/classes/class.ilSoapLMPageStructureObject.php";
79 return "ilSoapLMPageStructureObject";
80 case "git":
81 include_once "./webservice/soap/classes/class.ilSoapGLOTermStructureObject.php";
82 return "ilSoapGLOTermStructureObject";
83 case "gdf":
84 include_once "./webservice/soap/classes/class.ilSoapGLOTermDefinitionStructureObject.php";
85 return "ilSoapGLOTermDefinitionStructureObject";
86
87 }
88
89 return null;
90 }
$type

References $type.

Referenced by getInstanceForObject().

+ Here is the caller graph for this function:

◆ getInstance()

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

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

59 $classname = $this->_getClassnameForType($type);
60 if ($classname === null) {
61 return null;
62 }
63
64 return new $classname($objId, $type, $title, $description, $parentRefId);
65 }
Abstract classs for soap structure objects.
$objId
Definition: xapitoken.php:57

Referenced by ilSoapGLOStructureReader\_parseStructure().

+ Here is the caller graph for this function:

◆ getInstanceForObject()

ilSoapStructureObjectFactory::getInstanceForObject ( ilObject  $object)

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

33 {
34 $classname = $this->_getClassnameForType($object->getType());
35 if ($classname !== null) {
36 switch ($object->getType()) {
37 case "lm":
38 case "glo":
39 return new $classname(
40 $object->getId(),
41 $object->getType(),
42 $object->getTitle(),
43 $object->getLongDescription(),
44 $object->getRefId()
45 );
46 }
47 }
48
49 return null;
50 }
getLongDescription()
get object long description (stored in object_description)

References _getClassnameForType(), ilObject\getId(), ilObject\getLongDescription(), ilObject\getRefId(), ilObject\getTitle(), and ilObject\getType().

Referenced by ilSoapStructureReader\__construct().

+ 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: