ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator 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 25 of file class.ilManifestParser.php.

Constructor & Destructor Documentation

◆ __construct()

ilManifestParser::__construct ( string  $a_file)

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

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

37  {
38  parent::__construct($a_file, true);
39  $this->startParsing();
40  }
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 95 of file class.ilManifestParser.php.

References $expfiles.

95  : array
96  {
97  return $this->expfiles;
98  }

◆ getExportSets()

ilManifestParser::getExportSets ( )

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

References $expsets.

100  : array
101  {
102  return $this->expsets;
103  }

◆ getInstallId()

ilManifestParser::getInstallId ( )
final

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

References $install_id.

47  : string
48  {
49  return $this->install_id;
50  }

◆ getInstallUrl()

ilManifestParser::getInstallUrl ( )
final

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

References $install_url.

57  : string
58  {
59  return $this->install_url;
60  }

◆ getMainEntity()

ilManifestParser::getMainEntity ( )

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

References $main_entity.

67  : string
68  {
69  return $this->main_entity;
70  }

◆ getTitle()

ilManifestParser::getTitle ( )

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

References $title.

77  : string
78  {
79  return $this->title;
80  }

◆ handleBeginTag()

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

Begin Tag.

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

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

Referenced by setHandlers().

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

◆ handleCharacterData()

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

End Tag.

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

Referenced by setHandlers().

157  : void
158  {
159  //$a_data = str_replace("<","&lt;",$a_data);
160  //$a_data = str_replace(">","&gt;",$a_data);
161  // DELETE WHITESPACES AND NEWLINES OF CHARACTER DATA
162  //$a_data = preg_replace("/\n/","",$a_data);
163  //$a_data = preg_replace("/\t+/","",$a_data);
164 
165  $this->chr_data .= $a_data;
166  }
+ Here is the caller graph for this function:

◆ handleEndTag()

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

End Tag.

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

Referenced by setHandlers().

149  : void
150  {
151  $this->chr_data = "";
152  }
+ Here is the caller graph for this function:

◆ setHandlers()

ilManifestParser::setHandlers (   $a_xml_parser)

Set event handlers.

Parameters
resourcereference to the xml parser private

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

References handleBeginTag(), handleCharacterData(), and handleEndTag().

111  : void
112  {
113  xml_set_element_handler($a_xml_parser, $this->handleBeginTag(...), $this->handleEndTag(...));
114  xml_set_character_data_handler($a_xml_parser, $this->handleCharacterData(...));
115  }
handleBeginTag($a_xml_parser, string $a_name, array $a_attribs)
Begin Tag.
handleCharacterData($a_xml_parser, string $a_data)
End Tag.
handleEndTag($a_xml_parser, string $a_name)
End Tag.
+ Here is the call graph for this function:

◆ setInstallId()

ilManifestParser::setInstallId ( string  $a_val)
final

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

Referenced by handleBeginTag().

42  : void
43  {
44  $this->install_id = $a_val;
45  }
+ Here is the caller graph for this function:

◆ setInstallUrl()

ilManifestParser::setInstallUrl ( string  $a_val)
final

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

Referenced by handleBeginTag().

52  : void
53  {
54  $this->install_url = $a_val;
55  }
+ Here is the caller graph for this function:

◆ setMainEntity()

ilManifestParser::setMainEntity ( string  $a_val)

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

Referenced by handleBeginTag().

62  : void
63  {
64  $this->main_entity = $a_val;
65  }
+ Here is the caller graph for this function:

◆ setTitle()

ilManifestParser::setTitle ( string  $a_val)

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

Referenced by handleBeginTag().

72  : void
73  {
74  $this->title = $a_val;
75  }
+ Here is the caller graph for this function:

Field Documentation

◆ $chr_data

string ilManifestParser::$chr_data = ''
protected

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

◆ $expfiles

array ilManifestParser::$expfiles = array()
protected

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

Referenced by getExportFiles().

◆ $expsets

array ilManifestParser::$expsets = array()
protected

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

Referenced by getExportSets().

◆ $install_id

string ilManifestParser::$install_id = ''
protected

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

Referenced by getInstallId().

◆ $install_url

string ilManifestParser::$install_url = ''
protected

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

Referenced by getInstallUrl().

◆ $main_entity

string ilManifestParser::$main_entity = ''
protected

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

Referenced by getMainEntity().

◆ $target_release

string ilManifestParser::$target_release = ''
protected

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

◆ $title

string ilManifestParser::$title = ''
protected

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

Referenced by getTitle().


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