ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilWebResourceImporter Class Reference

Webresource xml importer. More...

+ Inheritance diagram for ilWebResourceImporter:
+ Collaboration diagram for ilWebResourceImporter:

Public Member Functions

 init ()
 Init. More...
 
 importXmlRepresentation ($a_entity, $a_id, $a_xml, $a_mapping)
 Import XML. More...
 
- Public Member Functions inherited from ilXmlImporter
 __construct ()
 Constructor. More...
 
 setImport ($a_val)
 Set import. More...
 
 getImport ()
 Get import. More...
 
 init ()
 Init. More...
 
 setInstallId ($a_val)
 Set installation id. More...
 
 getInstallId ()
 Get installation id. More...
 
 setInstallUrl ($a_val)
 Set installation url. More...
 
 getInstallUrl ()
 Get installation url. More...
 
 setSchemaVersion ($a_val)
 Set schema version. More...
 
 getSchemaVersion ()
 Get schema version. More...
 
 setImportDirectory ($a_val)
 Set import directory. More...
 
 getImportDirectory ()
 Get import directory. More...
 
 setSkipEntities ($a_val)
 Set skip entities. More...
 
 getSkipEntities ()
 Get skip entities. More...
 
 exportedFromSameInstallation ()
 Is exporting and importing installation identical? More...
 
 importXmlRepresentation ($a_entity, $a_id, $a_xml, $a_mapping)
 Import xml representation. More...
 
 finalProcessing ($a_mapping)
 Final processing. More...
 
 afterContainerImportProcessing (ilImportMapping $mapping)
 Called after all container objects have been implemented. More...
 

Private Attributes

 $webl = null
 

Additional Inherited Members

- Protected Attributes inherited from ilXmlImporter
 $skip_entities = array()
 
 $imp
 

Detailed Description

Webresource xml importer.

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

Definition at line 15 of file class.ilWebResourceImporter.php.

Member Function Documentation

◆ importXmlRepresentation()

ilWebResourceImporter::importXmlRepresentation (   $a_entity,
  $a_id,
  $a_xml,
  $a_mapping 
)

Import XML.

Parameters

return

Reimplemented from ilXmlImporter.

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

31 {
32 include_once './Modules/Folder/classes/class.ilObjFolder.php';
33 if($new_id = $a_mapping->getMapping('Services/Container','objs',$a_id))
34 {
35 $this->link = ilObjectFactory::getInstanceByObjId($new_id,false);
36 }
37 else
38 {
39 include_once './Modules/WebResource/classes/class.ilObjLinkResource.php';
40 $this->link = new ilObjLinkResource();
41 $this->link->setType('webr');
42 $this->link->create(true);
43 }
44
45 try
46 {
47 include_once './Modules/WebResource/classes/class.ilWebLinkXmlParser.php';
48 $parser = new ilWebLinkXmlParser($this->link,$a_xml);
49 $parser->setMode(ilWebLinkXmlParser::MODE_CREATE);
50 $parser->start();
51 $a_mapping->addMapping('Modules/WebResource','webr',$a_id,$this->link->getId());
52 }
53 catch(ilSaxParserException $e)
54 {
55 $GLOBALS['ilLog']->write(__METHOD__.': Parsing failed with message, "'.$e->getMessage().'".');
56 }
57 catch(ilWebLinkXMLParserException $e)
58 {
59 $GLOBALS['ilLog']->write(__METHOD__.': Parsing failed with message, "'.$e->getMessage().'".');
60 }
61 }
Class ilObjLinkResource.
getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
SaxParserException thrown by ilSaxParser if property throwException is set.
XML parser for weblink xml.
$GLOBALS['PHPCAS_CLIENT']
This global variable is used by the interface class phpCAS.
Definition: CAS.php:276

References $GLOBALS, ilObjectFactory\getInstanceByObjId(), and ilWebLinkXmlParser\MODE_CREATE.

+ Here is the call graph for this function:

◆ init()

ilWebResourceImporter::init ( )

Init.

Reimplemented from ilXmlImporter.

Definition at line 20 of file class.ilWebResourceImporter.php.

21 {
22 }

Field Documentation

◆ $webl

ilWebResourceImporter::$webl = null
private

Definition at line 17 of file class.ilWebResourceImporter.php.


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