ILIAS  Release_4_2_x_branch Revision 61807
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilFolderImporter Class Reference

folder xml importer More...

+ Inheritance diagram for ilFolderImporter:
+ Collaboration diagram for ilFolderImporter:

Public Member Functions

 init ()
 Init.
 importXmlRepresentation ($a_entity, $a_id, $a_xml, $a_mapping)
 Import XML.
- Public Member Functions inherited from ilXmlImporter
 __construct ()
 Constructor.
 setInstallId ($a_val)
 Set installation id.
 getInstallId ()
 Get installation id.
 setInstallUrl ($a_val)
 Set installation url.
 getInstallUrl ()
 Get installation url.
 setSchemaVersion ($a_val)
 Set schema version.
 getSchemaVersion ()
 Get schema version.
 setImportDirectory ($a_val)
 Set import directory.
 getImportDirectory ()
 Get import directory.
 finalProcessing ($a_mapping)
 Final processing.

Private Attributes

 $folder = null

Detailed Description

folder 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.ilFolderImporter.php.

Member Function Documentation

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

Import XML.

Parameters
@return

Reimplemented from ilXmlImporter.

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

References $GLOBALS, ilObjectFactory\getInstanceByObjId(), and ilObjectFactory\getInstanceByRefId().

{
include_once './Modules/Folder/classes/class.ilObjFolder.php';
if($new_id = $a_mapping->getMapping('Services/Container','objs',$a_id))
{
$this->folder = ilObjectFactory::getInstanceByObjId($new_id,false);
}
elseif($new_id = $a_mapping->getMapping('Services/Container','refs',0))
{
$this->folder = ilObjectFactory::getInstanceByRefId($new_id,false);
}
elseif(!$this->folder instanceof ilObjFolder)
{
$this->folder = new ilObjFolder();
$this->folder->create(true);
}
include_once './Modules/Folder/classes/class.ilFolderXmlParser.php';
#$GLOBALS['ilLog']->write($a_xml);
try
{
$parser = new ilFolderXmlParser($this->folder,$a_xml);
$parser->start();
$a_mapping->addMapping('Modules/Folder','fold',$a_id,$this->folder->getId());
}
{
$GLOBALS['ilLog']->write(__METHOD__.': Parsing failed with message, "'.$e->getMessage().'".');
}
catch(ilWebLinkXMLParserException $e)
{
$GLOBALS['ilLog']->write(__METHOD__.': Parsing failed with message, "'.$e->getMessage().'".');
}
}

+ Here is the call graph for this function:

ilFolderImporter::init ( )

Init.

Reimplemented from ilXmlImporter.

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

{
}

Field Documentation

ilFolderImporter::$folder = null
private

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


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