ILIAS  release_8 Revision v8.24
ilSOAPStructureObjectAdministration Class Reference

administration for structure objects More...

+ Inheritance diagram for ilSOAPStructureObjectAdministration:
+ Collaboration diagram for ilSOAPStructureObjectAdministration:

Public Member Functions

 getStructureObjects (string $sid, int $ref_id)
 
- Public Member Functions inherited from ilSoapAdministration
 __construct (bool $use_nusoap=true)
 
 getMessage ()
 
 appendMessage (string $a_str)
 
 setMessageCode (string $a_code)
 
 getMessageCode ()
 
 reInitUser ()
 
 isFault ($object)
 
 getInstallationInfoXML ()
 
 getClientInfoXML (string $clientid)
 

Additional Inherited Members

- Data Fields inherited from ilSoapAdministration
const NUSOAP = 1
 
const PHP5 = 2
 
int $error_method
 Defines type of error handling (PHP5 || NUSOAP) More...
 
- Protected Member Functions inherited from ilSoapAdministration
 checkSession (string $sid)
 
 explodeSid (string $sid)
 
 setMessage (string $a_str)
 
 initAuth (string $sid)
 
 initIlias ()
 
 initAuthenticationObject ()
 
 raiseError (string $a_message, $a_code)
 
 checkObjectAccess (int $ref_id, array $expected_type, string $permission, bool $returnObject=false)
 check access for ref id: expected type, permission, return object instance if returnobject is true More...
 
- Protected Attributes inherited from ilSoapAdministration
bool $soap_check = true
 
string $message = ''
 
string $message_code = ''
 

Detailed Description

administration for structure objects

Author
Roland Kuestermann (rku@a.nosp@m.ifb..nosp@m.uni-k.nosp@m.arls.nosp@m.ruhe..nosp@m.de)

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

Member Function Documentation

◆ getStructureObjects()

ilSOAPStructureObjectAdministration::getStructureObjects ( string  $sid,
int  $ref_id 
)
Returns
soap_fault|SoapFault|string|null

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

36 {
37 $this->initAuth($sid);
38 $this->initIlias();
39
40 if (!$this->checkSession($sid)) {
41 return $this->raiseError($this->getMessage(), $this->getMessageCode());
42 }
43
44 if (!$target_obj = ilObjectFactory::getInstanceByRefId($ref_id, false)) {
45 return $this->raiseError('No valid reference id given.', 'Client');
46 }
47
48 $structureReaderClassname = "ilSoap" . strtoupper($target_obj->getType()) . "StructureReader";
49 $filename = "./webservice/soap/classes/class." . $structureReaderClassname . ".php";
50
51 if (!file_exists($filename)) {
52 return $this->raiseError("Object type '" . $target_obj->getType() . "'is not supported.", 'Client');
53 }
54
55 include_once $filename;
56 $structureReader = new $structureReaderClassname($target_obj);
57 include_once './webservice/soap/classes/class.ilSoapStructureObjectXMLWriter.php';
58 $xml_writer = new ilSoapStructureObjectXMLWriter();
59 $structureObject = &$structureReader->getStructureObject();
60 $xml_writer->setStructureObject($structureObject);
61 if (!$xml_writer->start()) {
62 return $this->raiseError('Cannot create object xml !', 'Server');
63 }
64 return $xml_writer->getXML();
65 }
$filename
Definition: buildRTE.php:78
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
raiseError(string $a_message, $a_code)
XML writer class Class to simplify manual writing of xml documents.
$ref_id
Definition: ltiauth.php:67

References $filename, $ref_id, ilSoapAdministration\checkSession(), ilObjectFactory\getInstanceByRefId(), ilSoapAdministration\getMessage(), ilSoapAdministration\getMessageCode(), ilSoapAdministration\initAuth(), ilSoapAdministration\initIlias(), and ilSoapAdministration\raiseError().

+ Here is the call graph for this function:

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