ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilContainerReferenceImporter Class Reference

folder xml importer More...

+ Inheritance diagram for ilContainerReferenceImporter:
+ Collaboration diagram for ilContainerReferenceImporter:

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.
 setSkipEntities ($a_val)
 Set skip entities.
 getSkipEntities ()
 Get skip entities.
 finalProcessing ($a_mapping)
 Final processing.

Protected Member Functions

 initReference ($a_ref_id=0)
 Init reference.
 getType ()
 Get reference type.
 initParser ($a_xml)
 Init xml parser.
 getReference ()
 get reference

Protected Attributes

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

Detailed Description

folder xml importer

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
Id:
class.ilContainerReferenceImporter.php 35412 2012-07-06 10:28:29Z smeyer

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

Member Function Documentation

ilContainerReferenceImporter::getReference ( )
protected

get reference

Returns
ilContainerReference

Definition at line 47 of file class.ilContainerReferenceImporter.php.

References $ref.

Referenced by importXmlRepresentation().

{
return $this->ref;
}

+ Here is the caller graph for this function:

ilContainerReferenceImporter::getType ( )
abstractprotected

Get reference type.

Reimplemented in ilCategoryReferenceImporter, and ilCourseReferenceImporter.

Referenced by importXmlRepresentation().

+ Here is the caller graph for this function:

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

Import XML.

Parameters
@return

Reimplemented from ilXmlImporter.

Definition at line 58 of file class.ilContainerReferenceImporter.php.

References $GLOBALS, ilObject\_getAllReferences(), getReference(), getType(), initParser(), initReference(), and ilContainerReferenceXmlParser\MODE_UPDATE.

{
include_once './Modules/Category/classes/class.ilObjCategory.php';
if($new_id = $a_mapping->getMapping('Services/Container','objs',$a_id))
{
$refs = ilObject::_getAllReferences($new_id);
$this->initReference(end($refs));
}
// Mapping for containers without subitems
elseif($new_id = $a_mapping->getMapping('Services/Container','refs',0))
{
$this->initReference($new_id);
}
elseif(!$this->getReference() instanceof ilContainerReference)
{
$this->initReference();
$this->getReference()->create(true);
}
try
{
$parser = $this->initParser($a_xml);
$parser->setReference($this->getReference());
$parser->startParsing();
$a_mapping->addMapping(
$GLOBALS['objDefinition']->getComponentForType($this->getType()),
$this->getType(),
$a_id,
$this->getReference()->getId()
);
}
{
$GLOBALS['ilLog']->write(__METHOD__.': Parsing failed with message, "'.$e->getMessage().'".');
}
catch(Excpetion $e)
{
$GLOBALS['ilLog']->write(__METHOD__.': Parsing failed with message, "'.$e->getMessage().'".');
}
}

+ Here is the call graph for this function:

ilContainerReferenceImporter::init ( )

Init.

Reimplemented from ilXmlImporter.

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

{
}
ilContainerReferenceImporter::initParser (   $a_xml)
abstractprotected

Init xml parser.

Reimplemented in ilCategoryReferenceImporter, and ilCourseReferenceImporter.

Referenced by importXmlRepresentation().

+ Here is the caller graph for this function:

ilContainerReferenceImporter::initReference (   $a_ref_id = 0)
protected

Init reference.

Returns
ilContainerReference

Definition at line 28 of file class.ilContainerReferenceImporter.php.

References ilObjectFactory\getInstanceByRefId().

Referenced by importXmlRepresentation().

{
$this->ref = ilObjectFactory::getInstanceByRefId($a_ref_id,true);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

ilContainerReferenceImporter::$ref = null
protected

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

Referenced by getReference().


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