ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
All Data Structures Namespaces Files Functions Variables Modules Pages
ilImportMapping Class Reference

Import mapping. More...

+ Collaboration diagram for ilImportMapping:

Public Member Functions

 __construct ()
 Constructor. 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...
 
 setTagetId ($a_target_id)
 set target id More...
 
 getTargetId ()
 get target id More...
 
 addMapping ($a_comp, $a_entity, $a_old_id, $a_new_id)
 Add mapping. More...
 
 getMapping ($a_comp, $a_entity, $a_old_id)
 Get a mapping. More...
 
 getAllMappings ()
 Get mapping. More...
 
 getMappingsOfEntity ($a_comp, $a_entity)
 Get mappings for entity. More...
 

Data Fields

 $mappings
 
 $install_id
 
 $install_url
 

Protected Attributes

 $target_id = 0
 

Detailed Description

Import mapping.

Author
Alex Killing <alex.killing>
Version
$Id$

Definition at line 11 of file class.ilImportMapping.php.

Constructor & Destructor Documentation

◆ __construct()

ilImportMapping::__construct ( )

Constructor.

Parameters

Definition at line 25 of file class.ilImportMapping.php.

26  {
27  $this->mappings = array();
28  }

Member Function Documentation

◆ addMapping()

ilImportMapping::addMapping (   $a_comp,
  $a_entity,
  $a_old_id,
  $a_new_id 
)

Add mapping.

Parameters
stringcomponent
stringentity
stringold id
stringnew id

Definition at line 97 of file class.ilImportMapping.php.

98  {
99  $this->mappings[$a_comp][$a_entity][$a_old_id] = $a_new_id;
100  }

◆ getAllMappings()

ilImportMapping::getAllMappings ( )

Get mapping.

Returns
array mapping

Definition at line 130 of file class.ilImportMapping.php.

References $mappings.

131  {
132  return $this->mappings;
133  }

◆ getInstallId()

ilImportMapping::getInstallId ( )
final

Get Installation ID.

Returns
string Installation ID

Definition at line 45 of file class.ilImportMapping.php.

References $install_id.

46  {
47  return $this->install_id;
48  }

◆ getInstallUrl()

ilImportMapping::getInstallUrl ( )
final

Get Installation Url.

Returns
string Installation Url

Definition at line 65 of file class.ilImportMapping.php.

References $install_url.

66  {
67  return $this->install_url;
68  }

◆ getMapping()

ilImportMapping::getMapping (   $a_comp,
  $a_entity,
  $a_old_id 
)

Get a mapping.

Parameters
stringcomponent
stringentity
stringold id
Returns
string new id, or false if no mapping given

Definition at line 111 of file class.ilImportMapping.php.

Referenced by ilDataCollectionDataSet\getXmlNamespace().

112  {
113  if(!isset ($this->mappings[$a_comp]) or !isset ($this->mappings[$a_comp][$a_entity]))
114  {
115  return false;
116  }
117  if (isset($this->mappings[$a_comp][$a_entity][$a_old_id]))
118  {
119  return $this->mappings[$a_comp][$a_entity][$a_old_id];
120  }
121 
122  return false;
123  }
+ Here is the caller graph for this function:

◆ getMappingsOfEntity()

ilImportMapping::getMappingsOfEntity (   $a_comp,
  $a_entity 
)

Get mappings for entity.

Parameters
stringcomponent
stringentity
Returns

Definition at line 142 of file class.ilImportMapping.php.

143  {
144  if (isset($this->mappings[$a_comp][$a_entity]))
145  {
146  return $this->mappings[$a_comp][$a_entity];
147  }
148  return array();
149  }

◆ getTargetId()

ilImportMapping::getTargetId ( )
final

get target id

Returns

Definition at line 84 of file class.ilImportMapping.php.

References $target_id.

85  {
86  return $this->target_id;
87  }

◆ setInstallId()

ilImportMapping::setInstallId (   $a_val)
final

Set Installation ID.

Parameters
stringInstallation ID

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

36  {
37  $this->install_id = $a_val;
38  }

◆ setInstallUrl()

ilImportMapping::setInstallUrl (   $a_val)
final

Set Installation Url.

Parameters
stringInstallation Url

Definition at line 55 of file class.ilImportMapping.php.

56  {
57  $this->install_url = $a_val;
58  }

◆ setTagetId()

ilImportMapping::setTagetId (   $a_target_id)
final

set target id

Parameters
object$a_target_id
Returns

Definition at line 75 of file class.ilImportMapping.php.

76  {
77  $this->target_id = $a_target_id;
78  }

Field Documentation

◆ $install_id

ilImportMapping::$install_id

Definition at line 14 of file class.ilImportMapping.php.

Referenced by getInstallId().

◆ $install_url

ilImportMapping::$install_url

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

Referenced by getInstallUrl().

◆ $mappings

ilImportMapping::$mappings

Definition at line 13 of file class.ilImportMapping.php.

Referenced by getAllMappings().

◆ $target_id

ilImportMapping::$target_id = 0
protected

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

Referenced by getTargetId().


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