|
ILIAS
trunk Revision v12.0_alpha-377-g3641b37b9db
|
SAX based XML parser for record import files. More...
Inheritance diagram for ilAdvancedMDRecordParser:
Collaboration diagram for ilAdvancedMDRecordParser:Public Member Functions | |
| __construct (string $a_file) | |
| setMode (int $a_mode) | |
| getMode () | |
| startParsing () | |
| stores xml data in array More... | |
| setHandlers ($a_xml_parser) | |
| set event handlers More... | |
| setContext (int $a_obj_id, string $a_obj_type, ?string $a_sub_type=null) | |
| getRecordMap () | |
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) | |
Data Fields | |
| const | MODE_UNDEFINED = 0 |
| const | MODE_UPDATE = 1 |
| const | MODE_INSERT = 2 |
| const | MODE_UPDATE_VALIDATION = 3 |
| const | MODE_INSERT_VALIDATION = 4 |
Data Fields inherited from ilSaxParser | |
| string | $xml_file |
| bool | $throw_exception = false |
Protected Member Functions | |
| handlerBeginTag ($a_xml_parser, $a_name, $a_attribs) | |
| Handler for start tags @access protected. More... | |
| handlerEndTag ($a_xml_parser, $a_name) | |
| Handler for end tags @access protected. More... | |
| handlerCharacterData ($a_xml_parser, string $a_data) | |
| handler for character data More... | |
Protected Member Functions inherited from ilSaxParser | |
| openXMLFile () | |
| handleError (string $message) | |
| setThrowException (bool $throw_exception) | |
Protected Attributes | |
| array | $context |
| array | $scopes = [] |
| array | $translations = [] |
| string | $translation_language = '' |
| array | $field_translations = [] |
| string | $field_translation_language = '' |
| ilAdvancedMDRecord | $current_record = null |
| ilAdvancedMDFieldDefinition | $current_field = null |
| string | $cdata = '' |
| ilLogger | $log |
Protected Attributes inherited from ilSaxParser | |
| ilLanguage | $lng = null |
Private Member Functions | |
| initRecordObject (string $a_id) | |
| initFieldObject (int $a_id, string $a_type) | |
| Init field definition object. More... | |
| getCurrentRecord () | |
| getCurrentField () | |
| extractRecordId (string $a_id_string) | |
| appendErrorMessage (string $a_msg) | |
| storeRecords () | |
Private Attributes | |
| int | $mode = self::MODE_UNDEFINED |
| array | $fields = [] |
| bool | $is_error = false |
| array | $error_msg = [] |
| string | $field_value_id = '' |
| array | $rec_map |
SAX based XML parser for record import files.
Definition at line 27 of file class.ilAdvancedMDRecordParser.php.
| ilAdvancedMDRecordParser::__construct | ( | string | $a_file | ) |
Definition at line 60 of file class.ilAdvancedMDRecordParser.php.
References ILIAS\GlobalScreen\Provider\__construct(), and ilLoggerFactory\getLogger().
Here is the call graph for this function:
|
private |
Definition at line 328 of file class.ilAdvancedMDRecordParser.php.
Referenced by handlerBeginTag().
Here is the caller graph for this function:
|
private |
Definition at line 319 of file class.ilAdvancedMDRecordParser.php.
References ilAdvancedMDRecord\_lookupRecordIdByImportId().
Referenced by initRecordObject().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 314 of file class.ilAdvancedMDRecordParser.php.
References $current_field.
Referenced by handlerBeginTag(), and handlerEndTag().
Here is the caller graph for this function:
|
private |
Definition at line 309 of file class.ilAdvancedMDRecordParser.php.
References $current_record.
Referenced by handlerBeginTag(), handlerEndTag(), and storeRecords().
Here is the caller graph for this function:| ilAdvancedMDRecordParser::getMode | ( | ) |
Definition at line 71 of file class.ilAdvancedMDRecordParser.php.
References $mode.
Referenced by initFieldObject(), initRecordObject(), and storeRecords().
Here is the caller graph for this function:| ilAdvancedMDRecordParser::getRecordMap | ( | ) |
Definition at line 417 of file class.ilAdvancedMDRecordParser.php.
References $rec_map.
|
protected |
Handler for start tags @access protected.
Definition at line 99 of file class.ilAdvancedMDRecordParser.php.
References $scope, ilObject\_exists(), appendErrorMessage(), getCurrentField(), getCurrentRecord(), IL_INST_ID, initFieldObject(), initRecordObject(), ILIAS\Repository\lng(), ilLanguage\lookupId(), and ilUtil\parseImportId().
Referenced by setHandlers().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
handler for character data
| resource | $a_xml_parser | xml parser |
| string | $a_data | character data |
Definition at line 266 of file class.ilAdvancedMDRecordParser.php.
Referenced by setHandlers().
Here is the caller graph for this function:
|
protected |
Handler for end tags @access protected.
Definition at line 195 of file class.ilAdvancedMDRecordParser.php.
References $field_translation_language, $parts, $translation_language, getCurrentField(), getCurrentRecord(), and storeRecords().
Referenced by setHandlers().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Init field definition object.
Definition at line 293 of file class.ilAdvancedMDRecordParser.php.
References $current_field, ilAdvancedMDFieldDefinition\getInstanceByTypeString(), getMode(), MODE_INSERT, and MODE_INSERT_VALIDATION.
Referenced by handlerBeginTag().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 276 of file class.ilAdvancedMDRecordParser.php.
References ilAdvancedMDRecord\_getInstanceByRecordId(), extractRecordId(), getMode(), MODE_INSERT, and MODE_INSERT_VALIDATION.
Referenced by handlerBeginTag().
Here is the call graph for this function:
Here is the caller graph for this function:| ilAdvancedMDRecordParser::setContext | ( | int | $a_obj_id, |
| string | $a_obj_type, | ||
| ?string | $a_sub_type = null |
||
| ) |
Definition at line 404 of file class.ilAdvancedMDRecordParser.php.
| ilAdvancedMDRecordParser::setHandlers | ( | $a_xml_parser | ) |
set event handlers
| resource | reference to the xml parser @access private |
Reimplemented from ilSaxParser.
Definition at line 89 of file class.ilAdvancedMDRecordParser.php.
References handlerBeginTag(), handlerCharacterData(), and handlerEndTag().
Here is the call graph for this function:| ilAdvancedMDRecordParser::setMode | ( | int | $a_mode | ) |
Definition at line 66 of file class.ilAdvancedMDRecordParser.php.
| ilAdvancedMDRecordParser::startParsing | ( | ) |
stores xml data in array
| ilSaxParserException |
Reimplemented from ilSaxParser.
Definition at line 76 of file class.ilAdvancedMDRecordParser.php.
|
private |
Definition at line 334 of file class.ilAdvancedMDRecordParser.php.
References $translations, getCurrentRecord(), ilAdvancedMDRecordTranslations\getInstanceByRecordId(), getMode(), ILIAS\GlobalScreen\Scope\Footer\Factory\getTitle(), MODE_INSERT, MODE_INSERT_VALIDATION, and MODE_UPDATE_VALIDATION.
Referenced by handlerEndTag().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 56 of file class.ilAdvancedMDRecordParser.php.
|
protected |
Definition at line 44 of file class.ilAdvancedMDRecordParser.php.
|
protected |
Definition at line 55 of file class.ilAdvancedMDRecordParser.php.
Referenced by getCurrentField(), and initFieldObject().
|
protected |
Definition at line 54 of file class.ilAdvancedMDRecordParser.php.
Referenced by getCurrentRecord().
|
private |
Definition at line 41 of file class.ilAdvancedMDRecordParser.php.
|
protected |
Definition at line 51 of file class.ilAdvancedMDRecordParser.php.
Referenced by handlerEndTag().
|
protected |
Definition at line 50 of file class.ilAdvancedMDRecordParser.php.
|
private |
Definition at line 42 of file class.ilAdvancedMDRecordParser.php.
|
private |
Definition at line 38 of file class.ilAdvancedMDRecordParser.php.
|
private |
Definition at line 40 of file class.ilAdvancedMDRecordParser.php.
|
protected |
Definition at line 58 of file class.ilAdvancedMDRecordParser.php.
|
private |
Definition at line 36 of file class.ilAdvancedMDRecordParser.php.
Referenced by getMode().
|
private |
Definition at line 53 of file class.ilAdvancedMDRecordParser.php.
Referenced by getRecordMap().
|
protected |
Definition at line 45 of file class.ilAdvancedMDRecordParser.php.
|
protected |
Definition at line 48 of file class.ilAdvancedMDRecordParser.php.
Referenced by handlerEndTag().
|
protected |
Definition at line 47 of file class.ilAdvancedMDRecordParser.php.
Referenced by storeRecords().
| const ilAdvancedMDRecordParser::MODE_INSERT = 2 |
Definition at line 31 of file class.ilAdvancedMDRecordParser.php.
Referenced by ilAdvancedMDParser\createLocalRecord(), ilAdvancedMDSettingsGUI\importRecord(), initFieldObject(), initRecordObject(), and storeRecords().
| const ilAdvancedMDRecordParser::MODE_INSERT_VALIDATION = 4 |
Definition at line 34 of file class.ilAdvancedMDRecordParser.php.
Referenced by ilAdvancedMDParser\createLocalRecord(), ilAdvancedMDSettingsGUI\importRecord(), initFieldObject(), initRecordObject(), and storeRecords().
| const ilAdvancedMDRecordParser::MODE_UNDEFINED = 0 |
Definition at line 29 of file class.ilAdvancedMDRecordParser.php.
| const ilAdvancedMDRecordParser::MODE_UPDATE = 1 |
Definition at line 30 of file class.ilAdvancedMDRecordParser.php.
| const ilAdvancedMDRecordParser::MODE_UPDATE_VALIDATION = 3 |
Definition at line 33 of file class.ilAdvancedMDRecordParser.php.
Referenced by storeRecords().