function ilObjDefReader($a_path, $a_name, $a_type)
 {
     $this->name = $a_name;
     $this->type = $a_type;
     //echo "<br>-".$a_path."-".$this->name."-".$this->type."-";
     parent::ilSaxParser($a_path);
 }
 /**
  * Constructor
  *
  * @param	ilObjForum	$forum	 existing forum object
  * @param	string		$a_xml_file	xml data
  * @access	public
  */
 public function __construct($forum, $a_xml_data)
 {
     parent::__construct();
     $this->forum = $forum;
     $this->setXMLContent('<?xml version="1.0" encoding="utf-8"?>' . $a_xml_data);
     $this->aobject = new ilObjUser(ANONYMOUS_USER_ID);
 }
 /**
  * Constructor
  */
 public function __construct($folder, $xml)
 {
     parent::__construct();
     $this->setXMLContent($xml);
     $this->setFolder($folder);
     $this->setThrowException(true);
 }
 function __construct($a_obj_id, $a_mapping)
 {
     parent::__construct();
     $parts = explode(":", $a_obj_id);
     $this->obj_id = $parts[0];
     $this->mapping = $a_mapping;
 }
 /**
  * start the parser
  */
 function startParsing()
 {
     $this->styles = array();
     parent::startParsing();
     $this->style_obj->setStyle($this->styles);
     $this->style_obj->setCharacteristics($this->chars);
 }
 /**
  * Constructor
  *
  * @access	public
  */
 function ilMDSaxParser($a_xml_file = '')
 {
     global $lng, $tree;
     // Enable parsing. E.g qpl' s will set this value to false
     $this->md_parsing_enabled = true;
     parent::ilSaxParser($a_xml_file);
 }
 /**
  * start the parser
  */
 public function startParsing()
 {
     parent::startParsing();
     if ($this->ref instanceof ilContainerReference) {
         return $this->ref;
     }
     return 0;
 }
 /**
  * Constructor
  */
 function __construct($a_xml_file, &$test_object)
 {
     parent::__construct($a_xml_file, true);
     $this->tst_obj =& $test_object;
     $this->table = '';
     $this->active_id_mapping = array();
     $this->question_id_mapping = array();
     $this->user_criteria_checked = false;
 }
 /**
  * Constructor
  *
  * @param   ilObjFile  $file existing file object
  * @param	string		$a_xml_file			xml data
  * @param   int $obj_id obj id of exercise which is to be updated
  * @access	public
  */
 function ilFileXMLParser(&$file, $a_xml_data, $obj_id = -1, $mode = 0)
 {
     parent::ilSaxParser();
     $this->file = $file;
     $this->setXMLContent($a_xml_data);
     $this->obj_id = $obj_id;
     $this->result = false;
     $this->mode = $mode;
 }
示例#10
0
 function ilObjDefReader($a_path, $a_name, $a_type)
 {
     // init specialized readers
     foreach ($this->readers as $k => $reader) {
         $class = $reader["class"];
         $class_path = "./setup/classes/class." . $class . ".php";
         include_once $class_path;
         $this->readers[$k]["reader"] = new $class();
     }
     $this->name = $a_name;
     $this->type = $a_type;
     //echo "<br>-".$a_path."-".$this->name."-".$this->type."-";
     parent::ilSaxParser($a_path);
 }
 /**
  * start the parser
  */
 function startParsing()
 {
     parent::startParsing();
     switch ($this->getMode()) {
         case "check":
             if (count($this->not_imported)) {
                 return false;
             }
             break;
         case "import":
             $this->__insert();
             break;
     }
     return true;
 }
 /**
  * Constructor
  *
  * parse
  *
  * @access	public
  */
 function ilStyleDefinition($a_template_id = "")
 {
     global $ilias;
     if ($a_template_id == "") {
         // use function to get the current skin
         $a_template_id = self::getCurrentSkin();
     }
     // remember the template id
     $this->template_id = $a_template_id;
     if ($a_template_id == "default") {
         parent::ilSaxParser("./templates/" . $a_template_id . "/template.xml");
     } else {
         parent::ilSaxParser("./Customizing/global/skin/" . $a_template_id . "/template.xml");
     }
 }
 /**
  * Constructor
  * 
  * setup ILIAS global object
  * @access	public
  */
 function ilObjectDefinition()
 {
     global $ilias;
     $this->readDefinitionData();
     $this->ilias = $ilias;
     parent::ilSaxParser(ILIAS_ABSOLUTE_PATH . "/objects.xml");
     // removing this line leads to segmentation faults in
     // learning module editor with
     // - PHP 5.2.1, libxml 2.6.22, libxslt 1.1.15 (MacOsX)
     // - PHP 5.2.1, libxml 2.6.31, libxslt 1.1.22 (MacOsX)
     // - PHP 5.2.5, libxml 2.6.31, libxslt 1.1.22 (MacOsX)
     // - PHP 5.2.0-8+etch7, libxml 2.6.27, libxslt 1.1.19
     // - PHP 5.2.0, libxml, libxml 2.6.26, libxslt 1.1.17 (OpenSuse 10.2)
     // (needs further investigation)
     // OK with:
     // - PHP 5.1.2, libxml 2.6.24, libxslt 1.1.15
     //
     // Replacing all "=&" with "=" in xml5compliance seems to solve the problem
     //
     //		$this->startParsing();
 }
 /**
  * Constructor
  *
  * @param   ilExercise  $exercise   existing exercise object
  * @param	string		$a_xml_file			xml data
  * @param   int $obj_id obj id of exercise which is to be updated
  * @access	public
  */
 function ilExerciseXMLParser(&$exercise, $a_xml_data, $obj_id = -1)
 {
     // @todo: needs to be revised for multiple assignments per exercise
     parent::ilSaxParser();
     $this->exercise = $exercise;
     // get all assignments and choose first one if exists, otherwise create
     $assignments = ilExAssignment::getAssignmentDataOfExercise($exercise->getId());
     if (count($assignments) > 0) {
         $this->assignment = new ilExAssignment($assignments[0]["id"]);
     } else {
         $this->assignment = new ilExAssignment();
         $this->assignment->setExerciseId($exercise->getId());
         $this->assignment->save();
     }
     include_once "./Modules/Exercise/classes/class.ilFSStorageExercise.php";
     $this->storage = new ilFSStorageExercise($this->exercise->getId(), $this->assignment->getId());
     $this->storage->create();
     $this->storage->init();
     $this->setXMLContent($a_xml_data);
     $this->obj_id = $obj_id;
     $this->result = false;
 }
示例#15
0
 function openXMLFile()
 {
     $xmlContent = file_get_contents($this->xml_file);
     $xmlContent = $this->cleanInvalidXmlChars($xmlContent);
     file_put_contents($this->xml_file, $xmlContent);
     return parent::openXMLFile();
 }
示例#16
0
 function startParsing()
 {
     $this->question_counter = 1;
     parent::startParsing();
     return FALSE;
 }
示例#17
0
 /**
  * start the parser
  */
 function startParsing()
 {
     parent::startParsing();
 }
 /**
  * handler for character data
  *
  * @param	resource	$a_xml_parser		xml parser
  * @param	string		$a_data				character data
  */
 public function handlerCharacterData($a_xml_parser, $a_data)
 {
     if ($this->in_metadata) {
         parent::handlerCharacterData($a_xml_parser, $a_data);
     }
     if ($a_data != "\n") {
         // Replace multiple tabs with one space
         $a_data = preg_replace("/\t+/", " ", $a_data);
         $this->cdata .= $a_data;
     }
 }
 /**
  * constructor
  * @param	string	xml version
  * @param	string	output encoding
  * @param	string	input encoding
  * @access	public
  */
 function ilCopyWizardSettingsXMLParser($xml)
 {
     parent::ilSaxParser('', true);
     $this->setXMLContent($xml);
 }
 /**
  * start the parser
  */
 function startParsing()
 {
     parent::startParsing();
     if ($this->mode == ilGroupXMLParser::$CREATE) {
         return is_object($this->group_obj) ? $this->group_obj->getRefId() : false;
     } else {
         return is_object($this->group_obj) ? $this->group_obj->update() : false;
     }
 }
 /**
  * Constructor
  * @access	public
  */
 function ilnetucateResponse($a_str)
 {
     $xml_str = $this->validateInput($a_str);
     parent::ilSaxParser($xml_str);
     $this->startParsing();
 }
 /**
  * Constructor
  *
  * @access	public
  */
 function ilMDSaxParser($a_xml_file = '')
 {
     global $lng, $tree;
     parent::ilSaxParser($a_xml_file);
 }
 /**
  * Constructor
  * @param	string		$a_xml_data			xml data
  * @access	public
  */
 function ilXMLResultSetParser($a_xml_data = '')
 {
     parent::ilSaxParser();
     $this->setXMLContent($a_xml_data);
 }
 /**
  * start the parser
  */
 public function startParsing()
 {
     parent::startParsing();
     if ($this->mode == ilCategoryXmlParser::MODE_CREATE) {
         return is_object($this->cat) ? $this->cat->getRefId() : false;
     } else {
         return is_object($this->cat) ? $this->cat->update() : false;
     }
 }
 /**
  * parse xml file
  * 
  * @access	private
  * @throws ilSaxParserException
  * @throws ilObjectXMLException
  */
 function parse($a_xml_parser, $a_fp = null)
 {
     parent::parse($a_xml_parser, $a_fp);
 }