ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
Content Object Parser. More...
Public Member Functions | |
__construct (&$a_content_object, $a_xml_file, $a_subdir, $a_import_dir="") | |
Constructor. More... | |
setHandlers ($a_xml_parser) | |
set event handlers More... | |
setImportMapping (ilImportMapping $mapping=null) | |
Set import mapping. More... | |
startParsing () | |
start parser More... | |
storeTree () | |
insert StructureObjects and PageObjects into tree More... | |
processPagesToParse () | |
parse pages that contain files, mobs and/or internal links More... | |
copyMobFiles () | |
copy multimedia object files from import zip file to mob directory More... | |
copyFileItems () | |
copy files of file items More... | |
setQuestionMapping ($a_map) | |
set question import ident to pool/test question id mapping More... | |
beginElement ($a_name) | |
endElement ($a_name) | |
getCurrentElement () | |
getOpenCount ($a_name) | |
buildTag ($type, $name, $attr="") | |
generate a tag with given name and attributes More... | |
handlerBeginTag ($a_xml_parser, $a_name, $a_attribs) | |
handler for begin of element More... | |
processMeta () | |
check whether meta data should be processed More... | |
handlerEndTag ($a_xml_parser, $a_name) | |
handler for end of element More... | |
handlerCharacterData ($a_xml_parser, $a_data) | |
handler for character data More... | |
emptyMediaMetaCache (&$a_xml_parser) | |
send all cached tags to the meta data parser and clear the cache More... | |
getGlossaryTermMap () | |
Get glossary term map (imported ids to new ids) More... | |
Public Member Functions inherited from ilMDSaxParser | |
__construct ($a_xml_file='') | |
Constructor. More... | |
enableMDParsing ($a_status) | |
getMDParsingStatus () | |
setMDObject (&$md) | |
& | getMDObject () |
inMetaData () | |
setHandlers ($a_xml_parser) | |
set event handlers More... | |
handlerBeginTag ($a_xml_parser, $a_name, $a_attribs) | |
handler for begin of element More... | |
handlerEndTag ($a_xml_parser, $a_name) | |
handler for end of element More... | |
handlerCharacterData ($a_xml_parser, $a_data) | |
handler for character data More... | |
__getCharacterData () | |
__pushParent (&$md_obj) | |
& | __popParent () |
& | __getParent () |
__construct ($a_xml_file='') | |
Constructor. More... | |
setMDObject (&$md) | |
inMetaData () | |
handlerBeginTag ($a_xml_parser, $a_name, $a_attribs) | |
handler for begin of element More... | |
handlerEndTag ($a_xml_parser, $a_name) | |
handler for end of element More... | |
handlerCharacterData ($a_xml_parser, $a_data) | |
handler for character data More... | |
__getCharacterData () | |
__pushParent (&$md_obj) | |
& | __popParent () |
& | __getParent () |
Public Member Functions inherited from ilSaxParser | |
__construct ($a_xml_file='', $throwException=false) | |
Constructor setup ILIAS global object public. More... | |
setXMLContent ($a_xml_content) | |
getXMLContent () | |
getInputType () | |
startParsing () | |
stores xml data in array More... | |
createParser () | |
create parser More... | |
setOptions ($a_xml_parser) | |
set parser options More... | |
setHandlers ($a_xml_parser) | |
set event handler should be overwritten by inherited class private More... | |
openXMLFile () | |
open xml file More... | |
parse ($a_xml_parser, $a_fp=null) | |
parse xml file More... | |
freeParser ($a_xml_parser) | |
free xml parser handle More... | |
setThrowException ($throwException) | |
set error handling More... | |
Public Member Functions inherited from PEAR | |
__construct ($error_class=null) | |
Constructor. More... | |
_PEAR () | |
Destructor (the emulated type of...). More... | |
registerShutdownFunc ($func, $args=array()) | |
Use this function to register a shutdown method for static classes. More... | |
isError ($data, $code=null) | |
Tell whether a value is a PEAR error. More... | |
expectError ($code=' *') | |
This method is used to tell which errors you expect to get. More... | |
popExpect () | |
This method pops one element off the expected error codes stack. More... | |
_checkDelExpect ($error_code) | |
This method checks unsets an error code if available. More... | |
delExpect ($error_code) | |
This method deletes all occurences of the specified element from the expected error codes stack. More... | |
& | 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. More... | |
& | throwError ($message=null, $code=null, $userinfo=null) |
Simpler form of raiseError with fewer options. More... | |
staticPushErrorHandling ($mode, $options=null) | |
staticPopErrorHandling () | |
pushErrorHandling ($mode, $options=null) | |
Push a new error handler on top of the error handler options stack. More... | |
popErrorHandling () | |
Pop the last error handler used. More... | |
loadExtension ($ext) | |
OS independant PHP extension load. More... | |
Data Fields | |
$lng | |
$tree | |
$cnt | |
$current_element | |
$learning_module | |
$page_object | |
$lm_page_object | |
$structure_objects | |
$media_object | |
$current_object | |
$meta_data | |
$paragraph | |
$table | |
$lm_tree | |
$pg_into_tree | |
$st_into_tree | |
$container | |
$in_page_object | |
$in_meta_data | |
$in_media_object | |
$in_file_item | |
$in_glossary | |
$in_map_area | |
$content_object | |
$glossary_object | |
$file_item | |
$keyword_language | |
$pages_to_parse | |
$mob_mapping | |
$file_item_mapping | |
$subdir | |
$media_item | |
$loc_type | |
$map_area | |
$link_targets | |
$qst_mapping | |
$metadata_parsing_disabled | |
$in_meta_meta_data = false | |
Data Fields inherited from ilMDSaxParser | |
$md_in_md = false | |
$md_chr_data = '' | |
$md_cur_el = null | |
$md_parsing_enabled = null | |
$md = null | |
$md_gen | |
Data Fields inherited from ilSaxParser | |
$input_type = null | |
$xml_content = '' | |
$ilias | |
$lng | |
$xml_file | |
$throwException = false | |
Data Fields inherited from PEAR | |
$_debug = false | |
$_default_error_mode = null | |
$_default_error_options = null | |
$_default_error_handler = '' | |
$_error_class = 'PEAR_Error' | |
$_expected_errors = array() | |
Protected Attributes | |
$glossary_term_map = array() | |
$log | |
Protected Attributes inherited from ilMDSaxParser | |
$meta_log | |
Additional Inherited Members | |
Static Public Member Functions inherited from PEAR | |
static & | 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. More... | |
static | setErrorHandling ($mode=null, $options=null) |
Sets how errors generated by this object should be handled. More... | |
Protected Member Functions inherited from ilSaxParser | |
handleError ($message, $code) | |
use given error handler to handle error message or internal ilias error message handle More... | |
ilContObjParser::__construct | ( | & | $a_content_object, |
$a_xml_file, | |||
$a_subdir, | |||
$a_import_dir = "" |
|||
) |
Constructor.
object | $a_content_object | must be of type ilObjContentObject ilObjTest or ilObjQuestionPool |
string | $a_xml_file | xml file |
string | $a_subdir | subdirectory in import directory public |
Definition at line 87 of file class.ilContObjParser.php.
References $lng, $tree, array, ilLoggerFactory\getLogger(), and ilTree\setTreeTablePK().
ilContObjParser::beginElement | ( | $a_name | ) |
Definition at line 434 of file class.ilContObjParser.php.
Referenced by handlerBeginTag().
ilContObjParser::buildTag | ( | $type, | |
$name, | |||
$attr = "" |
|||
) |
generate a tag with given name and attributes
string | "start" | "end" for starting or ending tag |
string | element/tag name |
array | array of attributes |
Definition at line 491 of file class.ilContObjParser.php.
Referenced by handlerBeginTag(), and handlerEndTag().
ilContObjParser::copyFileItems | ( | ) |
copy files of file items
Definition at line 389 of file class.ilContObjParser.php.
References $test, ilUtil\makeDir(), and ilUtil\rCopy().
Referenced by startParsing().
ilContObjParser::copyMobFiles | ( | ) |
copy multimedia object files from import zip file to mob directory
Definition at line 346 of file class.ilContObjParser.php.
References ilUtil\getWebspaceDir(), ilUtil\makeDir(), and ilUtil\rCopy().
Referenced by startParsing().
ilContObjParser::emptyMediaMetaCache | ( | & | $a_xml_parser | ) |
send all cached tags to the meta data parser and clear the cache
Definition at line 1657 of file class.ilContObjParser.php.
References array.
Referenced by handlerBeginTag().
ilContObjParser::endElement | ( | $a_name | ) |
Definition at line 452 of file class.ilContObjParser.php.
Referenced by handlerEndTag().
ilContObjParser::getCurrentElement | ( | ) |
Definition at line 461 of file class.ilContObjParser.php.
Referenced by handlerCharacterData().
ilContObjParser::getGlossaryTermMap | ( | ) |
Get glossary term map (imported ids to new ids)
Definition at line 1690 of file class.ilContObjParser.php.
References $glossary_term_map.
ilContObjParser::getOpenCount | ( | $a_name | ) |
Definition at line 471 of file class.ilContObjParser.php.
ilContObjParser::handlerBeginTag | ( | $a_xml_parser, | |
$a_name, | |||
$a_attribs | |||
) |
handler for begin of element
resource | $a_xml_parser | xml parser |
string | $a_name | element name |
array | $a_attribs | element attributes array |
Meta Data Section
Definition at line 518 of file class.ilContObjParser.php.
References $content_object, $glossary_object, $lm_page_object, array, beginElement(), buildTag(), emptyMediaMetaCache(), ilMDSaxParser\enableMDParsing(), IL_EXT_LINK, IL_INT_LINK, ilUtil\parseImportId(), processMeta(), and ilUtil\yn2tf().
ilContObjParser::handlerCharacterData | ( | $a_xml_parser, | |
$a_data | |||
) |
handler for character data
resource | $a_xml_parser | xml parser |
string | $a_data | character data |
Definition at line 1584 of file class.ilContObjParser.php.
References array, getCurrentElement(), and processMeta().
ilContObjParser::handlerEndTag | ( | $a_xml_parser, | |
$a_name | |||
) |
handler for end of element
resource | $a_xml_parser | xml parser |
string | $a_name | element name |
Definition at line 1061 of file class.ilContObjParser.php.
References $file, $in_glossary, $in_media_object, ilLMObject\_writeImportId(), array, buildTag(), ilMDSaxParser\enableMDParsing(), endElement(), IL_MODE_ALIAS, ilUtil\parseImportId(), and processMeta().
ilContObjParser::processMeta | ( | ) |
check whether meta data should be processed
Definition at line 1040 of file class.ilContObjParser.php.
Referenced by handlerBeginTag(), handlerCharacterData(), and handlerEndTag().
ilContObjParser::processPagesToParse | ( | ) |
parse pages that contain files, mobs and/or internal links
Definition at line 225 of file class.ilContObjParser.php.
References $target_id, $target_type, ilPageObject\_exists(), ilInternalLink\_getSourcesOfTarget(), SurveyQuestion\_resolveIntLinks(), assQuestion\_resolveIntLinks(), ilMediaItem\_resolveMapAreaLinks(), array, and ilPageObjectFactory\getInstance().
Referenced by startParsing().
ilContObjParser::setHandlers | ( | $a_xml_parser | ) |
set event handlers
resource | reference to the xml parser private |
Definition at line 135 of file class.ilContObjParser.php.
ilContObjParser::setImportMapping | ( | ilImportMapping | $mapping = null | ) |
Set import mapping.
ilImportMapping | $mapping |
Definition at line 146 of file class.ilContObjParser.php.
ilContObjParser::setQuestionMapping | ( | $a_map | ) |
set question import ident to pool/test question id mapping
Definition at line 425 of file class.ilContObjParser.php.
ilContObjParser::startParsing | ( | ) |
start parser
Definition at line 155 of file class.ilContObjParser.php.
References copyFileItems(), copyMobFiles(), processPagesToParse(), and storeTree().
ilContObjParser::storeTree | ( | ) |
insert StructureObjects and PageObjects into tree
Definition at line 176 of file class.ilContObjParser.php.
References $ilLog.
Referenced by startParsing().
ilContObjParser::$cnt |
Definition at line 35 of file class.ilContObjParser.php.
ilContObjParser::$container |
Definition at line 49 of file class.ilContObjParser.php.
ilContObjParser::$content_object |
Definition at line 56 of file class.ilContObjParser.php.
Referenced by handlerBeginTag().
ilContObjParser::$current_element |
Definition at line 36 of file class.ilContObjParser.php.
ilContObjParser::$current_object |
Definition at line 42 of file class.ilContObjParser.php.
ilContObjParser::$file_item |
Definition at line 58 of file class.ilContObjParser.php.
ilContObjParser::$file_item_mapping |
Definition at line 62 of file class.ilContObjParser.php.
ilContObjParser::$glossary_object |
Definition at line 57 of file class.ilContObjParser.php.
Referenced by handlerBeginTag().
|
protected |
Definition at line 71 of file class.ilContObjParser.php.
Referenced by getGlossaryTermMap().
ilContObjParser::$in_file_item |
Definition at line 53 of file class.ilContObjParser.php.
ilContObjParser::$in_glossary |
Definition at line 54 of file class.ilContObjParser.php.
Referenced by handlerEndTag().
ilContObjParser::$in_map_area |
Definition at line 55 of file class.ilContObjParser.php.
ilContObjParser::$in_media_object |
Definition at line 52 of file class.ilContObjParser.php.
Referenced by handlerEndTag().
ilContObjParser::$in_meta_data |
Definition at line 51 of file class.ilContObjParser.php.
ilContObjParser::$in_meta_meta_data = false |
Definition at line 70 of file class.ilContObjParser.php.
ilContObjParser::$in_page_object |
Definition at line 50 of file class.ilContObjParser.php.
ilContObjParser::$keyword_language |
Definition at line 59 of file class.ilContObjParser.php.
ilContObjParser::$learning_module |
Definition at line 37 of file class.ilContObjParser.php.
ilContObjParser::$link_targets |
Definition at line 67 of file class.ilContObjParser.php.
ilContObjParser::$lm_page_object |
Definition at line 39 of file class.ilContObjParser.php.
Referenced by handlerBeginTag().
ilContObjParser::$lm_tree |
Definition at line 46 of file class.ilContObjParser.php.
ilContObjParser::$lng |
Definition at line 33 of file class.ilContObjParser.php.
Referenced by __construct().
ilContObjParser::$loc_type |
Definition at line 65 of file class.ilContObjParser.php.
|
protected |
Definition at line 76 of file class.ilContObjParser.php.
ilContObjParser::$map_area |
Definition at line 66 of file class.ilContObjParser.php.
ilContObjParser::$media_item |
Definition at line 64 of file class.ilContObjParser.php.
ilContObjParser::$media_object |
Definition at line 41 of file class.ilContObjParser.php.
ilContObjParser::$meta_data |
Definition at line 43 of file class.ilContObjParser.php.
ilContObjParser::$metadata_parsing_disabled |
Definition at line 69 of file class.ilContObjParser.php.
ilContObjParser::$mob_mapping |
Definition at line 61 of file class.ilContObjParser.php.
ilContObjParser::$page_object |
Definition at line 38 of file class.ilContObjParser.php.
ilContObjParser::$pages_to_parse |
Definition at line 60 of file class.ilContObjParser.php.
ilContObjParser::$paragraph |
Definition at line 44 of file class.ilContObjParser.php.
ilContObjParser::$pg_into_tree |
Definition at line 47 of file class.ilContObjParser.php.
ilContObjParser::$qst_mapping |
Definition at line 68 of file class.ilContObjParser.php.
ilContObjParser::$st_into_tree |
Definition at line 48 of file class.ilContObjParser.php.
ilContObjParser::$structure_objects |
Definition at line 40 of file class.ilContObjParser.php.
ilContObjParser::$subdir |
Definition at line 63 of file class.ilContObjParser.php.
ilContObjParser::$table |
Definition at line 45 of file class.ilContObjParser.php.
ilContObjParser::$tree |
Definition at line 34 of file class.ilContObjParser.php.
Referenced by __construct().