ILIAS
trunk Revision v11.0_alpha-1713-gd8962da2f67
|
Public Member Functions | |
__construct (public ilObjFile $file, string $a_xml_data, public int $obj_id=-1, public 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 | |
bool | $result = false |
result of parsing and updating 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 | ( | public ilObjFile | $file, |
string | $a_xml_data, | ||
public int | $obj_id = -1 , |
||
public int | $mode = 0 |
||
) |
Constructor.
$file | Exercise object which has been parsed |
$obj_id | this will be matched against the id in the xml in case we want to update an exercise |
$mode | Content compression mode, defaults to no compression |
Definition at line 61 of file class.ilFileXMLParser.php.
References ILIAS\GlobalScreen\Provider\__construct(), and ilSaxParser\setXMLContent().
|
private |
Definition at line 430 of file class.ilFileXMLParser.php.
Referenced by handlerEndTag().
|
private |
Definition at line 449 of file class.ilFileXMLParser.php.
Referenced by handlerEndTag().
ilFileXMLParser::getImportDirectory | ( | ) |
Get import directory.
Definition at line 96 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 124 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, ILIAS\Repository\int(), and null.
Referenced by setHandlers().
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 314 of file class.ilFileXMLParser.php.
References $CONTENT_COPY, and $CONTENT_REST.
Referenced by setHandlers().
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 204 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(), ilFileUtils\ilTempnam(), and null.
Referenced by setHandlers().
|
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 404 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 333 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 108 of file class.ilFileXMLParser.php.
References handlerBeginTag(), handlerCharacterData(), and handlerEndTag().
ilFileXMLParser::setImportDirectory | ( | ?string | $a_val | ) |
Set import directory.
string | import directory |
Definition at line 86 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 387 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 375 of file class.ilFileXMLParser.php.
|
protected |
Definition at line 50 of file class.ilFileXMLParser.php.
Referenced by handlerEndTag().
|
protected |
Definition at line 56 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 52 of file class.ilFileXMLParser.php.
Referenced by handlerBeginTag(), and handlerEndTag().
|
protected |
Definition at line 55 of file class.ilFileXMLParser.php.
Referenced by getImportDirectory().
|
protected |
Definition at line 51 of file class.ilFileXMLParser.php.
Referenced by handlerEndTag().
bool ilFileXMLParser::$result = false |
result of parsing and updating
Definition at line 43 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 47 of file class.ilFileXMLParser.php.
Referenced by handlerEndTag().
|
protected |
Definition at line 53 of file class.ilFileXMLParser.php.
Referenced by handlerBeginTag(), and handlerEndTag().
|
protected |
Definition at line 49 of file class.ilFileXMLParser.php.
Referenced by handlerEndTag().
|
protected |
Definition at line 54 of file class.ilFileXMLParser.php.