ILIAS
release_8 Revision v8.23
|
Public Member Functions | |
__construct (ilObjFile $file, string $a_xml_data, int $obj_id=-1, int $mode=0) | |
Constructor. More... | |
setImportDirectory (?string $a_val) | |
Set import directory. More... | |
getImportDirectory () | |
Get import directory. More... | |
setHandlers ($a_xml_parser) | |
set event handlers More... | |
handlerBeginTag ($a_xml_parser, string $a_name, array $a_attribs) | |
handler for begin of element More... | |
handlerEndTag ($a_xml_parser, string $a_name) | |
handler for end of element More... | |
handlerCharacterData ($a_xml_parser, string $a_data) | |
handler for character data More... | |
setFileContents () | |
update file according to filename and version, does not update history has to be called after (!) file save for new objects, since file storage will be initialised with obj id. More... | |
updateFileContents () | |
update file according to filename and version and create history entry has to be called after (!) file save for new objects, since file storage will be initialised with obj id. More... | |
start () | |
starts parsing an changes object by side effect. More... | |
![]() | |
__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) | |
Static Public Member Functions | |
static | normalizeRelativePath (string $path) |
Normalize relative directories in a path. More... | |
Data Fields | |
ilObjFile | $file |
Exercise object which has been parsed. More... | |
int | $obj_id |
this will be matched against the id in the xml in case we want to update an exercise More... | |
bool | $result |
result of parsing and updating More... | |
int | $mode |
Content compression mode, defaults to no compression. More... | |
string | $tmpFilename = null |
file of temporary file where we store the file content instead of in memory More... | |
![]() | |
string | $xml_file |
bool | $throw_exception = false |
Static Public Attributes | |
static int | $CONTENT_NOT_COMPRESSED = 0 |
static int | $CONTENT_GZ_COMPRESSED = 1 |
static int | $CONTENT_ZLIB_COMPRESSED = 2 |
static int | $CONTENT_COPY = 4 |
static int | $CONTENT_REST = 5 |
Protected Attributes | |
int | $version = null |
string | $action = null |
int | $max_version = null |
int | $date = null |
int | $usr_id = null |
array | $versions = [] |
string | $import_directory = null |
string | $cdata = null |
![]() | |
ilLanguage | $lng = null |
Private Member Functions | |
fastBase64Decode (string $filein, string $fileout) | |
fastGunzip (string $in, string $out) | |
Additional Inherited Members | |
![]() | |
openXMLFile () | |
handleError (string $message) | |
setThrowException (bool $throw_exception) | |
Definition at line 32 of file class.ilFileXMLParser.php.
ilFileXMLParser::__construct | ( | ilObjFile | $file, |
string | $a_xml_data, | ||
int | $obj_id = -1 , |
||
int | $mode = 0 |
||
) |
Constructor.
Definition at line 75 of file class.ilFileXMLParser.php.
References $file, $mode, $obj_id, ILIAS\GlobalScreen\Provider\__construct(), and ilSaxParser\setXMLContent().
|
private |
Definition at line 433 of file class.ilFileXMLParser.php.
Referenced by handlerEndTag().
|
private |
Definition at line 452 of file class.ilFileXMLParser.php.
Referenced by handlerEndTag().
ilFileXMLParser::getImportDirectory | ( | ) |
Get import directory.
Definition at line 100 of file class.ilFileXMLParser.php.
References $import_directory.
Referenced by handlerEndTag().
ilFileXMLParser::handlerBeginTag | ( | $a_xml_parser, | |
string | $a_name, | ||
array | $a_attribs | ||
) |
handler for begin of element
resource | $a_xml_parser | xml parser |
string | $a_name | element name |
array | $a_attribs | element attributes array |
ilFileException | when obj id != - 1 and if it it does not match the id in the xml or deflation mode is not supported |
Definition at line 129 of file class.ilFileXMLParser.php.
References $CONTENT_COPY, $CONTENT_GZ_COMPRESSED, $CONTENT_NOT_COMPRESSED, $CONTENT_REST, $CONTENT_ZLIB_COMPRESSED, $date, $DIC, ilFileException\$ID_DEFLATE_METHOD_MISMATCH, ilFileException\$ID_MISMATCH, $usr_id, ilUtil\__extractId(), IL_INST_ID, and ILIAS\Repository\int().
ilFileXMLParser::handlerCharacterData | ( | $a_xml_parser, | |
string | $a_data | ||
) |
handler for character data
resource | $a_xml_parser | xml parser |
string | $a_data | character data |
Definition at line 319 of file class.ilFileXMLParser.php.
References $CONTENT_COPY, and $CONTENT_REST.
ilFileXMLParser::handlerEndTag | ( | $a_xml_parser, | |
string | $a_name | ||
) |
handler for end of element
resource | $a_xml_parser | xml parser |
string | $a_name | element name |
Definition at line 209 of file class.ilFileXMLParser.php.
References $action, $CONTENT_COPY, $CONTENT_GZ_COMPRESSED, $CONTENT_REST, $CONTENT_ZLIB_COMPRESSED, $date, ilFileException\$DECOMPRESSION_FAILED, $DIC, $GLOBALS, $max_version, $tmpFilename, $usr_id, $version, fastBase64Decode(), fastGunzip(), getImportDirectory(), and ilFileUtils\ilTempnam().
|
static |
Normalize relative directories in a path.
Source: https://github.com/thephpleague/flysystem/blob/master/src/Util.php#L96 Workaround until we have
LogicException |
Definition at line 407 of file class.ilFileXMLParser.php.
References $parts.
ilFileXMLParser::setFileContents | ( | ) |
update file according to filename and version, does not update history has to be called after (!) file save for new objects, since file storage will be initialised with obj id.
Definition at line 338 of file class.ilFileXMLParser.php.
References ilHistory\_removeEntriesForObject(), and ilLoggerFactory\getLogger().
ilFileXMLParser::setHandlers | ( | $a_xml_parser | ) |
set event handlers
resource | reference to the xml parser |
private
Definition at line 112 of file class.ilFileXMLParser.php.
ilFileXMLParser::setImportDirectory | ( | ?string | $a_val | ) |
Set import directory.
string | import directory |
Definition at line 90 of file class.ilFileXMLParser.php.
ilFileXMLParser::start | ( | ) |
starts parsing an changes object by side effect.
ilFileException | when obj id != - 1 and if it it does not match the id in the xml |
Definition at line 390 of file class.ilFileXMLParser.php.
References ilSaxParser\startParsing().
ilFileXMLParser::updateFileContents | ( | ) |
update file according to filename and version and create history entry has to be called after (!) file save for new objects, since file storage will be initialised with obj id.
Definition at line 378 of file class.ilFileXMLParser.php.
|
protected |
Definition at line 64 of file class.ilFileXMLParser.php.
Referenced by handlerEndTag().
|
protected |
Definition at line 70 of file class.ilFileXMLParser.php.
|
static |
Definition at line 37 of file class.ilFileXMLParser.php.
Referenced by handlerBeginTag(), handlerCharacterData(), and handlerEndTag().
|
static |
Definition at line 35 of file class.ilFileXMLParser.php.
Referenced by handlerBeginTag(), and handlerEndTag().
|
static |
Definition at line 34 of file class.ilFileXMLParser.php.
Referenced by handlerBeginTag().
|
static |
Definition at line 39 of file class.ilFileXMLParser.php.
Referenced by handlerBeginTag(), handlerCharacterData(), and handlerEndTag().
|
static |
Definition at line 36 of file class.ilFileXMLParser.php.
Referenced by handlerBeginTag(), and handlerEndTag().
|
protected |
Definition at line 66 of file class.ilFileXMLParser.php.
Referenced by handlerBeginTag(), and handlerEndTag().
ilObjFile ilFileXMLParser::$file |
Exercise object which has been parsed.
Definition at line 44 of file class.ilFileXMLParser.php.
Referenced by __construct().
|
protected |
Definition at line 69 of file class.ilFileXMLParser.php.
Referenced by getImportDirectory().
|
protected |
Definition at line 65 of file class.ilFileXMLParser.php.
Referenced by handlerEndTag().
int ilFileXMLParser::$mode |
Content compression mode, defaults to no compression.
Definition at line 57 of file class.ilFileXMLParser.php.
Referenced by __construct().
int ilFileXMLParser::$obj_id |
this will be matched against the id in the xml in case we want to update an exercise
Definition at line 49 of file class.ilFileXMLParser.php.
Referenced by __construct().
bool ilFileXMLParser::$result |
result of parsing and updating
Definition at line 53 of file class.ilFileXMLParser.php.
string ilFileXMLParser::$tmpFilename = null |
file of temporary file where we store the file content instead of in memory
Definition at line 61 of file class.ilFileXMLParser.php.
Referenced by handlerEndTag().
|
protected |
Definition at line 67 of file class.ilFileXMLParser.php.
Referenced by handlerBeginTag(), and handlerEndTag().
|
protected |
Definition at line 63 of file class.ilFileXMLParser.php.
Referenced by handlerEndTag().
|
protected |
Definition at line 68 of file class.ilFileXMLParser.php.