ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilECSDataMappingSettings Class Reference
+ Collaboration diagram for ilECSDataMappingSettings:

Public Member Functions

 getServer ()
 Get actice ecs setting.
 getMappings ($a_mapping_type=0)
 get mappings
 getMappingByECSName ($a_mapping_type, $a_key)
 get mapping by key

Static Public Member Functions

static _getInstance ()
 Get Singleton instance.
static getInstanceByServerId ($a_server_id)
 Get singleton instance.
static delete ($a_server_id)
 Delete server ilDB $ilDB.

Private Member Functions

 __construct ($a_server_id)
 Singleton Constructor.
 read ()
 Read settings.

Private Attributes

 $settings = null
 $mappings = array()

Static Private Attributes

static $instances = null

Detailed Description

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

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

Constructor & Destructor Documentation

ilECSDataMappingSettings::__construct (   $a_server_id)
private

Singleton Constructor.

private

Definition at line 48 of file class.ilECSDataMappingSettings.php.

References getInstanceByServerId(), and read().

{
$this->settings = ilECSSetting::getInstanceByServerId($a_server_id);
$this->read();
}

+ Here is the call graph for this function:

Member Function Documentation

static ilECSDataMappingSettings::_getInstance ( )
static

Get Singleton instance.

public

Deprecated:

Definition at line 61 of file class.ilECSDataMappingSettings.php.

References $GLOBALS, and getInstanceByServerId().

Referenced by ilECSSettingsGUI\exportImported(), ilECSSettingsGUI\exportReleased(), ilAdvancedMDSubstitution\initECSMappings(), and ilAdvancedMDRecordGUI\showECSStart().

{
$GLOBALS['ilLog']->write(__METHOD__.': Using deprecate call');
$GLOBALS['ilLog']->logStack();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilECSDataMappingSettings::delete (   $a_server_id)
static

Delete server ilDB $ilDB.

Parameters
int$a_server_id

Definition at line 88 of file class.ilECSDataMappingSettings.php.

References $ilDB, and $query.

{
global $ilDB;
$query = 'DELETE from ecs_data_mapping '.
'WHERE sid = '.$ilDB->quote($a_server_id,'integer');
$ilDB->manipulate($query);
}
static ilECSDataMappingSettings::getInstanceByServerId (   $a_server_id)
static

Get singleton instance.

Parameters
int$a_server_id
Returns
ilECSDataMappingSettings

Definition at line 74 of file class.ilECSDataMappingSettings.php.

Referenced by __construct(), _getInstance(), ilECSObjectSettings\addMetadataToJson(), ilECSReleasedContentTableGUI\fillRow(), ilECSImportedContentTableGUI\fillRow(), ilRemoteObjectBase\importMetadataFromJson(), and ilECSSettingsGUI\initMappingsForm().

{
if(isset(self::$instances[$a_server_id]))
{
return self::$instances[$a_server_id];
}
return self::$instances[$a_server_id] = new ilECSDataMappingSettings($a_server_id);
}

+ Here is the caller graph for this function:

ilECSDataMappingSettings::getMappingByECSName (   $a_mapping_type,
  $a_key 
)

get mapping by key

public

Parameters
intmapping type import, export, crs, rcrs
stringECS data field name. E.g. 'lecturer'
Returns
int AdvancedMetaData field id or 0 (no mapping)

Definition at line 132 of file class.ilECSDataMappingSettings.php.

References ilECSDataMappingSetting\MAPPING_IMPORT_RCRS.

{
if(!$a_mapping_type)
{
}
return array_key_exists($a_key, (array) $this->mappings[$a_mapping_type]) ?
$this->mappings[$a_mapping_type][$a_key] :
0;
}
ilECSDataMappingSettings::getMappings (   $a_mapping_type = 0)

get mappings

public

Definition at line 113 of file class.ilECSDataMappingSettings.php.

References ilECSDataMappingSetting\MAPPING_IMPORT_RCRS.

{
if(!$a_mapping_type)
{
}
return $this->mappings[$a_mapping_type];
}
ilECSDataMappingSettings::getServer ( )

Get actice ecs setting.

Returns
ilECSSetting

Definition at line 101 of file class.ilECSDataMappingSettings.php.

References $settings.

Referenced by read().

{
}

+ Here is the caller graph for this function:

ilECSDataMappingSettings::read ( )
private

Read settings.

private

Definition at line 152 of file class.ilECSDataMappingSettings.php.

References $ilDB, $query, $res, $row, DB_FETCHMODE_OBJECT, and getServer().

Referenced by __construct().

{
global $ilDB;
$this->mappings = array();
$query = 'SELECT * FROM ecs_data_mapping '.
'WHERE sid = '.$ilDB->quote($this->getServer()->getServerId(),'integer').' ';
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$this->mappings[$row->mapping_type][$row->ecs_field] = $row->advmd_id;
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

ilECSDataMappingSettings::$instances = null
staticprivate

Definition at line 37 of file class.ilECSDataMappingSettings.php.

ilECSDataMappingSettings::$mappings = array()
private

Definition at line 40 of file class.ilECSDataMappingSettings.php.

ilECSDataMappingSettings::$settings = null
private

Definition at line 39 of file class.ilECSDataMappingSettings.php.

Referenced by getServer().


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