ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilImportMapping.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
3
12{
16
17 protected $target_id = 0;
18
25 function __construct()
26 {
27 $this->mappings = array();
28 }
29
35 final function setInstallId($a_val)
36 {
37 $this->install_id = $a_val;
38 }
39
45 final function getInstallId()
46 {
47 return $this->install_id;
48 }
49
55 final function setInstallUrl($a_val)
56 {
57 $this->install_url = $a_val;
58 }
59
65 final function getInstallUrl()
66 {
67 return $this->install_url;
68 }
69
75 public final function setTagetId($a_target_id)
76 {
77 $this->target_id = $a_target_id;
78 }
79
84 public final function getTargetId()
85 {
86 return $this->target_id;
87 }
88
97 function addMapping($a_comp, $a_entity, $a_old_id, $a_new_id)
98 {
99 $this->mappings[$a_comp][$a_entity][$a_old_id] = $a_new_id;
100 }
101
111 function getMapping($a_comp, $a_entity, $a_old_id)
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 }
124
130 function getAllMappings()
131 {
132 return $this->mappings;
133 }
134
142 function getMappingsOfEntity($a_comp, $a_entity)
143 {
144 if (isset($this->mappings[$a_comp][$a_entity]))
145 {
146 return $this->mappings[$a_comp][$a_entity];
147 }
148 return array();
149 }
150
151}
152?>
getAllMappings()
Get mapping.
__construct()
Constructor.
getMapping($a_comp, $a_entity, $a_old_id)
Get a mapping.
setTagetId($a_target_id)
set target id
getInstallId()
Get Installation ID.
setInstallUrl($a_val)
Set Installation Url.
setInstallId($a_val)
Set Installation ID.
getMappingsOfEntity($a_comp, $a_entity)
Get mappings for entity.
getTargetId()
get target id
getInstallUrl()
Get Installation Url.
addMapping($a_comp, $a_entity, $a_old_id, $a_new_id)
Add mapping.