ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
ilCOPageDefReader Class Reference

COPage definition xml reader class. More...

+ Collaboration diagram for ilCOPageDefReader:

Public Member Functions

 __construct (\ilDBInterface $db)
 
 clearTables ()
 Clear definition tables. More...
 
 handlerBeginTag ($a_xml_parser, $a_name, $a_attribs, $a_comp)
 Start tag handler. More...
 
 handlerEndTag ($a_xml_parser, $a_name)
 End tag handler. More...
 

Protected Member Functions

 getDB ()
 

Protected Attributes

 $db
 

Detailed Description

COPage definition xml reader class.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 11 of file class.ilCOPageDefReader.php.

Constructor & Destructor Documentation

◆ __construct()

ilCOPageDefReader::__construct ( \ilDBInterface  $db)

Definition at line 18 of file class.ilCOPageDefReader.php.

References $db.

19  {
20  $this->db = $db;
21  }

Member Function Documentation

◆ clearTables()

ilCOPageDefReader::clearTables ( )

Clear definition tables.

Parameters

Definition at line 34 of file class.ilCOPageDefReader.php.

References $ilDB, and getDB().

35  {
36  $ilDB = $this->getDB();
37 
38  $ilDB->manipulate("DELETE FROM copg_pc_def");
39  $ilDB->manipulate("DELETE FROM copg_pobj_def");
40  }
global $ilDB
+ Here is the call graph for this function:

◆ getDB()

ilCOPageDefReader::getDB ( )
protected

Definition at line 23 of file class.ilCOPageDefReader.php.

References $db.

Referenced by clearTables(), and handlerBeginTag().

24  {
25  return $this->db;
26  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the caller graph for this function:

◆ handlerBeginTag()

ilCOPageDefReader::handlerBeginTag (   $a_xml_parser,
  $a_name,
  $a_attribs,
  $a_comp 
)

Start tag handler.

Parameters
objectinternal xml_parser_handler
stringelement tag name
arrayelement attributes

Definition at line 49 of file class.ilCOPageDefReader.php.

References $ilDB, and getDB().

50  {
51  $ilDB = $this->getDB();
52 
53  switch ($a_name) {
54  case "pagecontent":
55  $ilDB->manipulate("INSERT INTO copg_pc_def " .
56  "(pc_type, name, component, directory, int_links, style_classes, xsl, def_enabled, top_item, order_nr) VALUES (" .
57  $ilDB->quote($a_attribs["pc_type"], "text") . "," .
58  $ilDB->quote($a_attribs["name"], "text") . "," .
59  $ilDB->quote($a_comp, "text") . "," .
60  $ilDB->quote($a_attribs["directory"], "text") . "," .
61  $ilDB->quote($a_attribs["int_links"], "integer") . "," .
62  $ilDB->quote($a_attribs["style_classes"], "integer") . "," .
63  $ilDB->quote($a_attribs["xsl"], "integer") . "," .
64  $ilDB->quote($a_attribs["def_enabled"], "integer") . "," .
65  $ilDB->quote($a_attribs["top_item"], "integer") . "," .
66  $ilDB->quote($a_attribs["order_nr"], "integer") .
67  ")");
68  break;
69 
70  case "pageobject":
71  $ilDB->manipulate("INSERT INTO copg_pobj_def " .
72  "(parent_type, class_name, component, directory) VALUES (" .
73  $ilDB->quote($a_attribs["parent_type"], "text") . "," .
74  $ilDB->quote($a_attribs["class_name"], "text") . "," .
75  $ilDB->quote($a_comp, "text") . "," .
76  $ilDB->quote($a_attribs["directory"], "text") .
77  ")");
78  break;
79  }
80  }
global $ilDB
+ Here is the call graph for this function:

◆ handlerEndTag()

ilCOPageDefReader::handlerEndTag (   $a_xml_parser,
  $a_name 
)

End tag handler.

Parameters
objectinternal xml_parser_handler
stringelement tag name

Definition at line 88 of file class.ilCOPageDefReader.php.

89  {
90  }

Field Documentation

◆ $db

ilCOPageDefReader::$db
protected

Definition at line 16 of file class.ilCOPageDefReader.php.

Referenced by __construct(), and getDB().


The documentation for this class was generated from the following file: