ILIAS  Release_4_1_x_branch Revision 61804
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilManifestParser Class Reference

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

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

Public Member Functions

 __construct ($a_file)
 Constructor.
 setInstallId ($a_val)
 Set Installation ID.
 getInstallId ()
 Get Installation ID.
 setInstallUrl ($a_val)
 Set Installation Url.
 getInstallUrl ()
 Get Installation Url.
 setMainEntity ($a_val)
 Set main entity.
 getMainEntity ()
 Get main entity.
 setTitle ($a_val)
 Set title.
 getTitle ()
 Get title.
 setTargetRelease ($a_val)
 Set target release.
 getTargetRelease ()
 Get target release.
 getExportFiles ()
 Get xml files.
 getExportSets ()
 setHandlers ($a_xml_parser)
 Set event handlers.
 startParsing ()
 Start parser.
 handleBeginTag ($a_xml_parser, $a_name, $a_attribs)
 Begin Tag.
 handleEndTag ($a_xml_parser, $a_name)
 End Tag.
 handleCharacterData ($a_xml_parser, $a_data)
 End Tag.
- Public Member Functions inherited from ilSaxParser
 ilSaxParser ($a_xml_file= '', $throwException=false)
 Constructor setup ILIAS global object public.
 setXMLContent ($a_xml_content)
 getXMLContent ()
 getInputType ()
 createParser ()
 create parser
 setOptions ($a_xml_parser)
 set parser options
 openXMLFile ()
 open xml file
 parse ($a_xml_parser, $a_fp=null)
 parse xml file
 freeParser ($a_xml_parser)
 free xml parser handle
 setThrowException ($throwException)
 set error handling
- Public Member Functions inherited from PEAR
 PEAR ($error_class=null)
 Constructor.
 _PEAR ()
 Destructor (the emulated type of...).
getStaticProperty ($class, $var)
 If you have a class that's mostly/entirely static, and you need static properties, you can use this method to simulate them.
 registerShutdownFunc ($func, $args=array())
 Use this function to register a shutdown method for static classes.
 isError ($data, $code=null)
 Tell whether a value is a PEAR error.
 setErrorHandling ($mode=null, $options=null)
 Sets how errors generated by this object should be handled.
 expectError ($code= '*')
 This method is used to tell which errors you expect to get.
 popExpect ()
 This method pops one element off the expected error codes stack.
 _checkDelExpect ($error_code)
 This method checks unsets an error code if available.
 delExpect ($error_code)
 This method deletes all occurences of the specified element from the expected error codes stack.
raiseError ($message=null, $code=null, $mode=null, $options=null, $userinfo=null, $error_class=null, $skipmsg=false)
 This method is a wrapper that returns an instance of the configured error class with this object's default error handling applied.
throwError ($message=null, $code=null, $userinfo=null)
 Simpler form of raiseError with fewer options.
 staticPushErrorHandling ($mode, $options=null)
 staticPopErrorHandling ()
 pushErrorHandling ($mode, $options=null)
 Push a new error handler on top of the error handler options stack.
 popErrorHandling ()
 Pop the last error handler used.
 loadExtension ($ext)
 OS independant PHP extension load.

Protected Attributes

 $expfiles = array()
 $expsets = array()

Additional Inherited Members

- Data Fields inherited from ilSaxParser
 $input_type = null
 $xml_content = ''
 $ilias
 $lng
 $xml_file
 $throwException = false
- Protected Member Functions inherited from ilSaxParser
 handleError ($message, $code)
 use given error handler to handle error message or internal ilias error message handle

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
Version
$Id$

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

Constructor & Destructor Documentation

ilManifestParser::__construct (   $a_file)

Constructor.

Parameters
@return

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

References ilSaxParser\ilSaxParser(), and startParsing().

{
parent::ilSaxParser($a_file, true);
$this->startParsing();
}

+ Here is the call graph for this function:

Member Function Documentation

ilManifestParser::getExportFiles ( )

Get xml files.

Returns
array of strings xml file pathes

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

References $expfiles.

{
}
ilManifestParser::getExportSets ( )

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

References $expsets.

{
}
ilManifestParser::getInstallId ( )
final

Get Installation ID.

Returns
string Installation ID

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

{
return $this->install_id;
}
ilManifestParser::getInstallUrl ( )
final

Get Installation Url.

Returns
string Installation Url

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

{
return $this->install_url;
}
ilManifestParser::getMainEntity ( )

Get main entity.

Returns
string main entity

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

{
return $this->main_entity;
}
ilManifestParser::getTargetRelease ( )

Get target release.

Returns
string target release

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

{
return $this->target_release;
}
ilManifestParser::getTitle ( )

Get title.

Returns
string title

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

References $title.

{
return $this->title;
}
ilManifestParser::handleBeginTag (   $a_xml_parser,
  $a_name,
  $a_attribs 
)

Begin Tag.

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

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

{
switch ($a_name)
{
case "Manifest":
$this->setInstallId($a_attribs["InstallationId"]);
$this->setInstallUrl($a_attribs["InstallationUrl"]);
$this->setTitle($a_attribs["Title"]);
$this->setTargetRelease($a_attribs["TargetRelease"]);
$this->setMainEntity($a_attribs["MainEntity"]);
break;
case "ExportFile":
$this->expfiles[] = array("component" => $a_attribs["Component"],
"path" => $a_attribs["Path"]);
break;
case "ExportSet":
$this->expsets[] = array(
'path' => $a_attribs['Path'],
'type' => $a_attribs['Type']
);
break;
}
}

+ Here is the call graph for this function:

ilManifestParser::handleCharacterData (   $a_xml_parser,
  $a_data 
)

End Tag.

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

{
//$a_data = str_replace("<","&lt;",$a_data);
//$a_data = str_replace(">","&gt;",$a_data);
// DELETE WHITESPACES AND NEWLINES OF CHARACTER DATA
//$a_data = preg_replace("/\n/","",$a_data);
//$a_data = preg_replace("/\t+/","",$a_data);
$this->chr_data .= $a_data;
}
ilManifestParser::handleEndTag (   $a_xml_parser,
  $a_name 
)

End Tag.

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

{
$this->chr_data = "";
}
ilManifestParser::setHandlers (   $a_xml_parser)

Set event handlers.

Parameters
resourcereference to the xml parser private

Reimplemented from ilSaxParser.

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

{
xml_set_object($a_xml_parser,$this);
xml_set_element_handler($a_xml_parser, 'handleBeginTag', 'handleEndTag');
xml_set_character_data_handler($a_xml_parser, 'handleCharacterData');
}
ilManifestParser::setInstallId (   $a_val)
final

Set Installation ID.

Parameters
stringInstallation ID

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

Referenced by handleBeginTag().

{
$this->install_id = $a_val;
}

+ Here is the caller graph for this function:

ilManifestParser::setInstallUrl (   $a_val)
final

Set Installation Url.

Parameters
stringInstallation Url

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

Referenced by handleBeginTag().

{
$this->install_url = $a_val;
}

+ Here is the caller graph for this function:

ilManifestParser::setMainEntity (   $a_val)

Set main entity.

Parameters
stringmain entity

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

Referenced by handleBeginTag().

{
$this->main_entity = $a_val;
}

+ Here is the caller graph for this function:

ilManifestParser::setTargetRelease (   $a_val)

Set target release.

Parameters
stringtarget release

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

Referenced by handleBeginTag().

{
$this->target_release = $a_val;
}

+ Here is the caller graph for this function:

ilManifestParser::setTitle (   $a_val)

Set title.

Parameters
stringtitle

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

Referenced by handleBeginTag().

{
$this->title = $a_val;
}

+ Here is the caller graph for this function:

ilManifestParser::startParsing ( )

Start parser.

Reimplemented from ilSaxParser.

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

Referenced by __construct().

+ Here is the caller graph for this function:

Field Documentation

ilManifestParser::$expfiles = array()
protected

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

Referenced by getExportFiles().

ilManifestParser::$expsets = array()
protected

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

Referenced by getExportSets().


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