コード例 #1
0
 /**
  * start tag handler
  *
  * @param	ressouce	internal xml_parser_handler
  * @param	string		element tag name
  * @param	array		element attributes
  * @access	private
  */
 function handlerBeginTag($a_xml_parser, $a_name, $a_attribs)
 {
     global $ilDB;
     parent::handlerBeginTag($a_xml_parser, $a_name, $a_attribs);
     switch ($a_name) {
         case 'module':
             $this->current_module = $this->name;
             $this->current_component = $this->type . "/" . $this->name;
             $ilDB->manipulateF("INSERT INTO il_component (type, name, id) " . "VALUES (%s,%s,%s)", array("text", "text", "text"), array($this->type, $this->name, $a_attribs["id"]));
             break;
         case 'baseclass':
             $ilDB->manipulateF("INSERT INTO module_class (module, class, dir) " . "VALUES (%s,%s,%s)", array("text", "text", "text"), array($this->name, $a_attribs["name"], $a_attribs["dir"]));
             break;
     }
 }