本文整理汇总了PHP中ilObjMediaObject::exportXML方法的典型用法代码示例。如果您正苦于以下问题:PHP ilObjMediaObject::exportXML方法的具体用法?PHP ilObjMediaObject::exportXML怎么用?PHP ilObjMediaObject::exportXML使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilObjMediaObject
的用法示例。
在下文中一共展示了ilObjMediaObject::exportXML方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: exportXMLMediaObjects
function exportXMLMediaObjects(&$a_xml_writer, $a_inst, $a_target_dir, &$expLog)
{
include_once "./Services/MediaObjects/classes/class.ilObjMediaObject.php";
include_once "./Modules/File/classes/class.ilObjFile.php";
$linked_mobs = array();
if (is_array($this->mob_ids)) {
// mobs directly embedded into pages
foreach ($this->mob_ids as $mob_id) {
if ($mob_id > 0) {
$expLog->write(date("[y-m-d H:i:s] ") . "Media Object " . $mob_id);
$media_obj = new ilObjMediaObject($mob_id);
$media_obj->exportXML($a_xml_writer, $a_inst);
$lmobs = $media_obj->getLinkedMediaObjects($this->mob_ids);
$linked_mobs = array_merge($linked_mobs, $lmobs);
unset($media_obj);
}
}
// linked mobs (in map areas)
foreach ($linked_mobs as $mob_id) {
if ($mob_id > 0) {
$expLog->write(date("[y-m-d H:i:s] ") . "Media Object " . $mob_id);
$media_obj = new ilObjMediaObject($mob_id);
$media_obj->exportXML($a_xml_writer, $a_inst);
unset($media_obj);
}
}
}
if (is_array($this->file_ids)) {
foreach ($this->file_ids as $file_id) {
$expLog->write(date("[y-m-d H:i:s] ") . "File Item " . $file_id);
$file_obj = new ilObjFile($file_id, false);
$file_obj->export($a_target_dir);
unset($file_obj);
}
}
}
示例2: exportXMLMediaObjects
/**
* export media objects to xml (see ilias_co.dtd)
*
* @param object $a_xml_writer ilXmlWriter object that receives the
* xml data
*/
function exportXMLMediaObjects(&$a_xml_writer, $a_inst, $a_target_dir, &$expLog)
{
include_once "./Services/MediaObjects/classes/class.ilObjMediaObject.php";
foreach ($this->mob_ids as $mob_id) {
$expLog->write(date("[y-m-d H:i:s] ") . "Media Object " . $mob_id);
if (ilObjMediaObject::_exists($mob_id)) {
$media_obj = new ilObjMediaObject($mob_id);
$media_obj->exportXML($a_xml_writer, $a_inst);
$media_obj->exportFiles($a_target_dir);
unset($media_obj);
}
}
}
示例3: exportXMLMediaObjects
/**
* export media objects to xml (see ilias_co.dtd)
*
* @param object $a_xml_writer ilXmlWriter object that receives the
* xml data
*/
function exportXMLMediaObjects(&$a_xml_writer, $a_inst, $a_target_dir, &$expLog)
{
include_once "./Services/MediaObjects/classes/class.ilObjMediaObject.php";
$linked_mobs = array();
// mobs directly embedded into pages
foreach ($this->mob_ids as $mob_id) {
if ($mob_id > 0 && ilObject::_lookupType($mob_id) == "mob") {
$expLog->write(date("[y-m-d H:i:s] ") . "Media Object " . $mob_id);
$media_obj = new ilObjMediaObject($mob_id);
$media_obj->exportXML($a_xml_writer, $a_inst);
$media_obj->exportFiles($a_target_dir);
$lmobs = $media_obj->getLinkedMediaObjects($this->mob_ids);
$linked_mobs = array_merge($linked_mobs, $lmobs);
unset($media_obj);
}
}
// linked mobs (in map areas)
foreach ($linked_mobs as $mob_id) {
if ($mob_id > 0) {
$expLog->write(date("[y-m-d H:i:s] ") . "Media Object " . $mob_id);
$media_obj = new ilObjMediaObject($mob_id);
$media_obj->exportXML($a_xml_writer, $a_inst);
$media_obj->exportFiles($a_target_dir);
unset($media_obj);
}
}
}