00001 <?php 00002 00003 /* 00004 +-----------------------------------------------------------------------------+ 00005 | ILIAS open source | 00006 +-----------------------------------------------------------------------------+ 00007 | Copyright (c) 1998-2001 ILIAS open source, University of Cologne | 00008 | | 00009 | This program is free software; you can redistribute it and/or | 00010 | modify it under the terms of the GNU General Public License | 00011 | as published by the Free Software Foundation; either version 2 | 00012 | of the License, or (at your option) any later version. | 00013 | | 00014 | This program is distributed in the hope that it will be useful, | 00015 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 00016 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 00017 | GNU General Public License for more details. | 00018 | | 00019 | You should have received a copy of the GNU General Public License | 00020 | along with this program; if not, write to the Free Software | 00021 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 00022 +-----------------------------------------------------------------------------+ 00023 */ 00024 00038 include_once "./classes/class.ilXmlWriter.php"; 00039 00040 class ilSoapStructureObjectXMLWriter extends ilXmlWriter 00041 { 00042 var $ilias; 00043 var $xml; 00044 var $structureObject; 00045 var $user_id = 0; 00046 00054 function ilSoapStructureObjectXMLWriter() 00055 { 00056 global $ilias,$ilUser; 00057 00058 parent::ilXmlWriter(); 00059 00060 $this->ilias =& $ilias; 00061 $this->user_id = $ilUser->getId(); 00062 } 00063 00064 00065 function setStructureObject(& $structureObject) 00066 { 00067 $this->structureObject = & $structureObject; 00068 } 00069 00070 00071 function start() 00072 { 00073 if (!is_object($this->structureObject)) 00074 return false; 00075 00076 $this->__buildHeader(); 00077 00078 $this->structureObject->exportXML ($this); 00079 00080 $this->__buildFooter(); 00081 00082 return true; 00083 } 00084 00085 function getXML() 00086 { 00087 return $this->xmlDumpMem(FALSE); 00088 } 00089 00090 00091 function __buildHeader() 00092 { 00093 $this->xmlSetDtdDef("<!DOCTYPE RepositoryObject PUBLIC \"-//ILIAS//DTD UserImport//EN\" \"".ILIAS_HTTP_PATH."/xml/ilias_soap_structure_object_3_7.dtd\">"); 00094 $this->xmlSetGenCmt("Internal Structure Information of Repository Object"); 00095 $this->xmlHeader(); 00096 00097 00098 return true; 00099 } 00100 00101 function __buildFooter() 00102 { 00103 00104 } 00105 00106 } 00107 00108 00109 ?>