ILIAS  release_8 Revision v8.24
ilPluginReader Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilPluginReader:
+ Collaboration diagram for ilPluginReader:

Public Member Functions

 __construct (?string $a_path, $a_ctype, $a_cname, $a_slot_id, $a_pname)
 
 clearEvents ()
 Delete the event listeneing information. More...
 
 startParsing ()
 stores xml data in array More...
 
 setHandlers ($a_xml_parser)
 
 handlerBeginTag ($a_xml_parser, $a_name, $a_attribs)
 start tag handler More...
 
 handlerEndTag ($a_xml_parser, $a_name)
 end tag handler More...
 
 handlerCharacterData ($a_xml_parser, $a_data)
 end tag handler More...
 
- Public Member Functions inherited from ilSaxParser
 __construct (?string $path_to_file='', ?bool $throw_exception=false)
 
 setXMLContent (string $a_xml_content)
 
 getXMLContent ()
 
 getInputType ()
 
 startParsing ()
 stores xml data in array More...
 
 createParser ()
 
 setHandlers ($a_xml_parser)
 
 parse ($a_xml_parser, $a_fp=null)
 

Protected Attributes

 $ctype
 
 $cname
 
 $slot_id
 
 $pname
 
- Protected Attributes inherited from ilSaxParser
ilLanguage $lng = null
 

Additional Inherited Members

- Data Fields inherited from ilSaxParser
string $xml_file
 
bool $throw_exception = false
 
- Protected Member Functions inherited from ilSaxParser
 openXMLFile ()
 
 handleError (string $message)
 
 setThrowException (bool $throw_exception)
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Class ilPluginReader

This is only used in ilPlugin.

@deprecate as of ILIAS 9

Reads plugin information of plugin.xml files into db

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

Definition at line 32 of file class.ilPluginReader.php.

Constructor & Destructor Documentation

◆ __construct()

ilPluginReader::__construct ( ?string  $a_path,
  $a_ctype,
  $a_cname,
  $a_slot_id,
  $a_pname 
)

Definition at line 39 of file class.ilPluginReader.php.

40 {
41 parent::__construct($a_path);
42
43 $this->ctype = $a_ctype;
44 $this->cname = $a_cname;
45 $this->slot_id = $a_slot_id;
46 $this->pname = $a_pname;
47 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References ILIAS\GlobalScreen\Provider\__construct().

+ Here is the call graph for this function:

Member Function Documentation

◆ clearEvents()

ilPluginReader::clearEvents ( )

Delete the event listeneing information.

Definition at line 52 of file class.ilPluginReader.php.

52 : void
53 {
54 global $DIC;
55 $ilDB = $DIC->database();
56
57 $component = "Plugins/" . $this->pname;
58 $ilDB->manipulate("DELETE FROM il_event_handling WHERE component = " . $ilDB->quote($component, 'text'));
59 }
global $DIC
Definition: feed.php:28

References $DIC, $ilDB, and $pname.

◆ handlerBeginTag()

ilPluginReader::handlerBeginTag (   $a_xml_parser,
  $a_name,
  $a_attribs 
)

start tag handler

Parameters
mixedinternal xml_parser_handler
stringelement tag name
arrayelement attributes @access private

Definition at line 86 of file class.ilPluginReader.php.

86 : void
87 {
88 global $DIC;
89 $ilDB = $DIC->database();
90
91 if ($a_name === "event") {
92 $component = "Plugins/" . $this->pname;
93 $q = "INSERT INTO il_event_handling (component, type, id) VALUES (" .
94 $ilDB->quote($component, "text") . "," .
95 $ilDB->quote($a_attribs["type"], "text") . "," .
96 $ilDB->quote($a_attribs["id"], "text") . ")";
97 $ilDB->manipulate($q);
98 }
99 }

References $DIC, $ilDB, and $pname.

◆ handlerCharacterData()

ilPluginReader::handlerCharacterData (   $a_xml_parser,
  $a_data 
)

end tag handler

Parameters
mixedinternal xml_parser_handler
stringdata @access private

Definition at line 119 of file class.ilPluginReader.php.

119 : void
120 {
121 }

◆ handlerEndTag()

ilPluginReader::handlerEndTag (   $a_xml_parser,
  $a_name 
)

end tag handler

Parameters
mixedinternal xml_parser_handler
stringelement tag name @access private

Definition at line 108 of file class.ilPluginReader.php.

108 : void
109 {
110 }

◆ setHandlers()

ilPluginReader::setHandlers (   $a_xml_parser)
Parameters
XMLParser | resource$a_xml_parser
Returns
void

Reimplemented from ilSaxParser.

Definition at line 71 of file class.ilPluginReader.php.

71 : void
72 {
73 xml_set_object($a_xml_parser, $this);
74 xml_set_element_handler($a_xml_parser, 'handlerBeginTag', 'handlerEndTag');
75 xml_set_character_data_handler($a_xml_parser, 'handlerCharacterData');
76 }

◆ startParsing()

ilPluginReader::startParsing ( )

stores xml data in array

Exceptions
ilSaxParserException

Reimplemented from ilSaxParser.

Definition at line 62 of file class.ilPluginReader.php.

62 : void
63 {
64 if ($this->getInputType() === 'file' && !file_exists($this->xml_file)) {
65 // not every plugin has a plugin.xml yet
66 return;
67 }
68 parent::startParsing();
69 }

References ilSaxParser\getInputType().

+ Here is the call graph for this function:

Field Documentation

◆ $cname

ilPluginReader::$cname
protected

Definition at line 35 of file class.ilPluginReader.php.

◆ $ctype

ilPluginReader::$ctype
protected

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

◆ $pname

ilPluginReader::$pname
protected

Definition at line 37 of file class.ilPluginReader.php.

Referenced by clearEvents(), and handlerBeginTag().

◆ $slot_id

ilPluginReader::$slot_id
protected

Definition at line 36 of file class.ilPluginReader.php.


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