ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ilManifestParser Class Reference

Manifest parser for ILIAS standard export files. More...

+ Inheritance diagram for ilManifestParser:
+ Collaboration diagram for ilManifestParser:

Public Member Functions

 __construct (string $a_file)
 
 setInstallId (string $a_val)
 
 getInstallId ()
 
 setInstallUrl (string $a_val)
 
 getInstallUrl ()
 
 setMainEntity (string $a_val)
 
 getMainEntity ()
 
 setTitle (string $a_val)
 
 getTitle ()
 
 getExportFiles ()
 
 getExportSets ()
 
 setHandlers ($a_xml_parser)
 Set event handlers. More...
 
 handleBeginTag ($a_xml_parser, string $a_name, array $a_attribs)
 Begin Tag. More...
 
 handleEndTag ($a_xml_parser, string $a_name)
 End Tag. More...
 
 handleCharacterData ($a_xml_parser, string $a_data)
 End Tag. 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

string $chr_data = ''
 
string $target_release = ''
 
string $title = ''
 
string $main_entity = ''
 
string $install_id = ''
 
string $install_url = ''
 
array $expfiles = array()
 
array $expsets = array()
 
- 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

Manifest parser for ILIAS standard export files.

Author
Aleex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e

Definition at line 22 of file class.ilManifestParser.php.

Constructor & Destructor Documentation

◆ __construct()

ilManifestParser::__construct ( string  $a_file)

Definition at line 33 of file class.ilManifestParser.php.

References ILIAS\GlobalScreen\Provider\__construct(), and ilSaxParser\startParsing().

34  {
35  parent::__construct($a_file, true);
36  $this->startParsing();
37  }
startParsing()
stores xml data in array
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ getExportFiles()

ilManifestParser::getExportFiles ( )

Definition at line 92 of file class.ilManifestParser.php.

References $expfiles.

92  : array
93  {
94  return $this->expfiles;
95  }

◆ getExportSets()

ilManifestParser::getExportSets ( )

Definition at line 97 of file class.ilManifestParser.php.

References $expsets.

97  : array
98  {
99  return $this->expsets;
100  }

◆ getInstallId()

ilManifestParser::getInstallId ( )
final

Definition at line 44 of file class.ilManifestParser.php.

References $install_id.

44  : string
45  {
46  return $this->install_id;
47  }

◆ getInstallUrl()

ilManifestParser::getInstallUrl ( )
final

Definition at line 54 of file class.ilManifestParser.php.

References $install_url.

54  : string
55  {
56  return $this->install_url;
57  }

◆ getMainEntity()

ilManifestParser::getMainEntity ( )

Definition at line 64 of file class.ilManifestParser.php.

References $main_entity.

64  : string
65  {
66  return $this->main_entity;
67  }

◆ getTitle()

ilManifestParser::getTitle ( )

Definition at line 74 of file class.ilManifestParser.php.

References $title.

74  : string
75  {
76  return $this->title;
77  }

◆ handleBeginTag()

ilManifestParser::handleBeginTag (   $a_xml_parser,
string  $a_name,
array  $a_attribs 
)

Begin Tag.

Definition at line 118 of file class.ilManifestParser.php.

References setInstallId(), setInstallUrl(), setMainEntity(), and setTitle().

118  : void
119  {
120  switch ($a_name) {
121  case "Manifest":
122  $this->setInstallId($a_attribs["InstallationId"]);
123  $this->setInstallUrl($a_attribs["InstallationUrl"]);
124  $this->setTitle($a_attribs["Title"]);
125  //$this->setTargetRelease($a_attribs["TargetRelease"]);
126  $this->setMainEntity($a_attribs["MainEntity"]);
127  break;
128 
129  case "ExportFile":
130  $this->expfiles[] = array("component" => $a_attribs["Component"],
131  "path" => $a_attribs["Path"]
132  );
133  break;
134 
135  case "ExportSet":
136  $this->expsets[] = array(
137  'path' => $a_attribs['Path'],
138  'type' => $a_attribs['Type']
139  );
140  break;
141  }
142  }
setInstallId(string $a_val)
setMainEntity(string $a_val)
setInstallUrl(string $a_val)
+ Here is the call graph for this function:

◆ handleCharacterData()

ilManifestParser::handleCharacterData (   $a_xml_parser,
string  $a_data 
)

End Tag.

Definition at line 155 of file class.ilManifestParser.php.

155  : void
156  {
157  //$a_data = str_replace("<","&lt;",$a_data);
158  //$a_data = str_replace(">","&gt;",$a_data);
159  // DELETE WHITESPACES AND NEWLINES OF CHARACTER DATA
160  //$a_data = preg_replace("/\n/","",$a_data);
161  //$a_data = preg_replace("/\t+/","",$a_data);
162 
163  $this->chr_data .= $a_data;
164  }

◆ handleEndTag()

ilManifestParser::handleEndTag (   $a_xml_parser,
string  $a_name 
)

End Tag.

Definition at line 147 of file class.ilManifestParser.php.

147  : void
148  {
149  $this->chr_data = "";
150  }

◆ setHandlers()

ilManifestParser::setHandlers (   $a_xml_parser)

Set event handlers.

Parameters
resourcereference to the xml parser private

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

108  : void
109  {
110  xml_set_object($a_xml_parser, $this);
111  xml_set_element_handler($a_xml_parser, 'handleBeginTag', 'handleEndTag');
112  xml_set_character_data_handler($a_xml_parser, 'handleCharacterData');
113  }

◆ setInstallId()

ilManifestParser::setInstallId ( string  $a_val)
final

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

Referenced by handleBeginTag().

39  : void
40  {
41  $this->install_id = $a_val;
42  }
+ Here is the caller graph for this function:

◆ setInstallUrl()

ilManifestParser::setInstallUrl ( string  $a_val)
final

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

Referenced by handleBeginTag().

49  : void
50  {
51  $this->install_url = $a_val;
52  }
+ Here is the caller graph for this function:

◆ setMainEntity()

ilManifestParser::setMainEntity ( string  $a_val)

Definition at line 59 of file class.ilManifestParser.php.

Referenced by handleBeginTag().

59  : void
60  {
61  $this->main_entity = $a_val;
62  }
+ Here is the caller graph for this function:

◆ setTitle()

ilManifestParser::setTitle ( string  $a_val)

Definition at line 69 of file class.ilManifestParser.php.

Referenced by handleBeginTag().

69  : void
70  {
71  $this->title = $a_val;
72  }
+ Here is the caller graph for this function:

Field Documentation

◆ $chr_data

string ilManifestParser::$chr_data = ''
protected

Definition at line 24 of file class.ilManifestParser.php.

◆ $expfiles

array ilManifestParser::$expfiles = array()
protected

Definition at line 30 of file class.ilManifestParser.php.

Referenced by getExportFiles().

◆ $expsets

array ilManifestParser::$expsets = array()
protected

Definition at line 31 of file class.ilManifestParser.php.

Referenced by getExportSets().

◆ $install_id

string ilManifestParser::$install_id = ''
protected

Definition at line 28 of file class.ilManifestParser.php.

Referenced by getInstallId().

◆ $install_url

string ilManifestParser::$install_url = ''
protected

Definition at line 29 of file class.ilManifestParser.php.

Referenced by getInstallUrl().

◆ $main_entity

string ilManifestParser::$main_entity = ''
protected

Definition at line 27 of file class.ilManifestParser.php.

Referenced by getMainEntity().

◆ $target_release

string ilManifestParser::$target_release = ''
protected

Definition at line 25 of file class.ilManifestParser.php.

◆ $title

string ilManifestParser::$title = ''
protected

Definition at line 26 of file class.ilManifestParser.php.

Referenced by getTitle().


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