當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ilObjMediaObject::exportXML方法代碼示例

本文整理匯總了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);
         }
     }
 }
開發者ID:bheyser,項目名稱:qplskl,代碼行數:36,代碼來源:class.ilSCORM2004Asset.php

示例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);
         }
     }
 }
開發者ID:Walid-Synakene,項目名稱:ilias,代碼行數:19,代碼來源:class.ilObjQuestionPool.php

示例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);
         }
     }
 }
開發者ID:Walid-Synakene,項目名稱:ilias,代碼行數:33,代碼來源:class.ilObjContentObject.php


注:本文中的ilObjMediaObject::exportXML方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。