ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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.

37 {
38 parent::__construct($a_file, true);
39 $this->startParsing();
40 }
startParsing()
stores xml data in array
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

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

+ Here is the call graph for this function:

Member Function Documentation

◆ getExportFiles()

ilManifestParser::getExportFiles ( )

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

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

References $expfiles.

◆ getExportSets()

ilManifestParser::getExportSets ( )

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

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

References $expsets.

◆ getInstallId()

ilManifestParser::getInstallId ( )
final

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

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

References $install_id.

◆ getInstallUrl()

ilManifestParser::getInstallUrl ( )
final

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

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

References $install_url.

◆ getMainEntity()

ilManifestParser::getMainEntity ( )

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

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

References $main_entity.

◆ getTitle()

ilManifestParser::getTitle ( )

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

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

References $title.

◆ handleBeginTag()

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

Begin Tag.

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

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 }
setMainEntity(string $a_val)
setInstallId(string $a_val)
setInstallUrl(string $a_val)

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

Referenced by setHandlers().

+ 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.

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 }

Referenced by setHandlers().

+ 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.

149 : void
150 {
151 $this->chr_data = "";
152 }

Referenced by setHandlers().

+ Here is the caller graph for this function:

◆ setHandlers()

ilManifestParser::setHandlers (   $a_xml_parser)

Set event handlers.

Parameters
resourcereference to the xml parser @access private

Reimplemented from ilSaxParser.

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

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.
handleEndTag($a_xml_parser, string $a_name)
End Tag.
handleCharacterData($a_xml_parser, string $a_data)
End Tag.

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

+ Here is the call graph for this function:

◆ setInstallId()

ilManifestParser::setInstallId ( string  $a_val)
final

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

42 : void
43 {
44 $this->install_id = $a_val;
45 }

Referenced by handleBeginTag().

+ Here is the caller graph for this function:

◆ setInstallUrl()

ilManifestParser::setInstallUrl ( string  $a_val)
final

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

52 : void
53 {
54 $this->install_url = $a_val;
55 }

Referenced by handleBeginTag().

+ Here is the caller graph for this function:

◆ setMainEntity()

ilManifestParser::setMainEntity ( string  $a_val)

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

62 : void
63 {
64 $this->main_entity = $a_val;
65 }

Referenced by handleBeginTag().

+ Here is the caller graph for this function:

◆ setTitle()

ilManifestParser::setTitle ( string  $a_val)

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

72 : void
73 {
74 $this->title = $a_val;
75 }

Referenced by handleBeginTag().

+ 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: