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

Exporter class for files. More...

+ Inheritance diagram for ilFileExporter:
+ Collaboration diagram for ilFileExporter:

Public Member Functions

 init ()
 Initialisation.
 getXmlExportTailDependencies ($a_entity, $a_target_release, $a_ids)
 Get tail dependencies.
 getXmlRepresentation ($a_entity, $a_target_release, $a_id)
 Get xml representation.
 getValidSchemaVersions ($a_entity)
 Returns schema versions that the component can export to.
- Public Member Functions inherited from ilXmlExporter
 __construct ()
 Constructor.
 setExportDirectories ($a_dir_relative, $a_dir_absolute)
 Export directories.
 getRelativeExportDirectory ()
 Get relative export directory.
 getAbsoluteExportDirectory ()
 Get absolute export directory.
 getXmlExportHeadDependencies ($a_entity, $a_target_release, $a_ids)
 Get head dependencies.
 determineSchemaVersion ($a_entity, $a_target_release)
 Determine schema version.

Additional Inherited Members

- Static Public Member Functions inherited from ilXmlExporter
static lookupExportDirectory ($a_obj_type, $a_obj_id, $a_export_type= 'xml')
 export directory lookup
- Protected Attributes inherited from ilXmlExporter
 $dir_relative
 $dir_absolute

Detailed Description

Exporter class for files.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
Id:

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

Member Function Documentation

ilFileExporter::getValidSchemaVersions (   $a_entity)

Returns schema versions that the component can export to.

ILIAS chooses the first one, that has min/max constraints which fit to the target release. Please put the newest on top.

Returns

Reimplemented from ilXmlExporter.

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

{
return array (
"4.1.0" => array(
"namespace" => "http://www.ilias.de/Modules/File/file/4_1",
"xsd_file" => "ilias_file_4_1.xsd",
"min" => "4.1.0",
"max" => "")
);
}
ilFileExporter::getXmlExportTailDependencies (   $a_entity,
  $a_target_release,
  $a_ids 
)

Get tail dependencies.

Parameters
stringentity
stringtarget release
arrayids
Returns
array array of array with keys "component", entity", "ids"

Reimplemented from ilXmlExporter.

Definition at line 31 of file class.ilFileExporter.php.

{
$md_ids = array();
foreach ($a_ids as $file_id)
{
$md_ids[] = $file_id.":0:file";
}
return array (
array(
"component" => "Services/MetaData",
"entity" => "md",
"ids" => $md_ids)
);
}
ilFileExporter::getXmlRepresentation (   $a_entity,
  $a_target_release,
  $a_id 
)

Get xml representation.

Parameters
stringentity
stringtarget release
stringid
Returns
string xml string

Reimplemented from ilXmlExporter.

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

References ilFileXMLWriter\$CONTENT_ATTACH_COPY, $file, ilObject\_lookupType(), ilXmlExporter\getAbsoluteExportDirectory(), ilXmlExporter\getRelativeExportDirectory(), and ilUtil\makeDirParents().

{
include_once("./Modules/File/classes/class.ilObjFile.php");
include_once("./Modules/File/classes/class.ilFileXMLWriter.php");
if (ilObject::_lookupType($a_id) == "file")
{
$file = new ilObjFile($a_id, false);
$writer = new ilFileXMLWriter();
$writer->setFile($file);
$writer->setOmitHeader(true);
$writer->setAttachFileContents(ilFileXMLWriter::$CONTENT_ATTACH_COPY);
$writer->setFileTargetDirectories($this->getRelativeExportDirectory(),
$writer->start();
$xml.= $writer->getXml();
}
return $xml;
}

+ Here is the call graph for this function:

ilFileExporter::init ( )

Initialisation.

Reimplemented from ilXmlExporter.

Definition at line 19 of file class.ilFileExporter.php.

{
}

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