Definition at line 12 of file class.ilObjectXMLParser.php.
◆ __construct()
ilObjectXMLParser::__construct |
( |
string |
$a_xml_data = '' , |
|
|
?bool |
$throw_exception = false |
|
) |
| |
◆ addProperty()
ilObjectXMLParser::addProperty |
( |
string |
$a_name, |
|
|
|
$a_value |
|
) |
| |
|
private |
◆ addReference()
ilObjectXMLParser::addReference |
( |
int |
$a_ref_id, |
|
|
int |
$a_parent_id, |
|
|
array |
$a_time_target |
|
) |
| |
|
private |
Definition at line 183 of file class.ilObjectXMLParser.php.
References $curr_obj.
Referenced by handlerEndTag().
185 $reference[
'ref_id'] = $a_ref_id;
186 $reference[
'parent_id'] = $a_parent_id;
187 $reference[
'time_target'] = $a_time_target;
189 if (isset($reference[
'time_target'][
'changeable']) && $reference[
'time_target'][
'changeable'] &&
190 !isset($reference[
'time_target'][
'suggestion_start'], $reference[
'time_target'][
'suggestion_end'])) {
192 'Missing attributes: "starting_time" and "ending_time" required for attribute "changeable"' Exception class for ObjectXMLWriter and ObjectXMLParser.
◆ getObjectData()
ilObjectXMLParser::getObjectData |
( |
| ) |
|
◆ handlerBeginTag()
ilObjectXMLParser::handlerBeginTag |
( |
|
$a_xml_parser, |
|
|
string |
$a_name, |
|
|
array |
$a_attribs |
|
) |
| |
- Parameters
-
XMLParser | resource | $a_xml_parser | |
Definition at line 47 of file class.ilObjectXMLParser.php.
References $curr_obj, ilUtil\__extractId(), addProperty(), and IL_INST_ID.
57 $this->
addProperty(
'type', (
string) $a_attribs[
'type']);
61 $a_attribs[
"obj_id"] ??
'',
65 $this->
addProperty(
'offline', $a_attribs[
'offline']);
77 $this->time_target = [];
78 $this->ref_id = $a_attribs[
"ref_id"];
79 $this->parent_id = $a_attribs[
'parent_id'];
83 $this->time_target[
'timing_type'] = $a_attribs[
'type'];
87 $this->time_target[
'timing_visibility'] = $a_attribs[
'visibility'];
88 if (isset($a_attribs[
'starting_time'])) {
89 $this->time_target[
'starting_time'] = $a_attribs[
'starting_time'];
91 if (isset($a_attribs[
'ending_time'])) {
92 $this->time_target[
'ending_time'] = $a_attribs[
'ending_time'];
95 if ($a_attribs[
'ending_time'] < $a_attribs[
'starting_time']) {
101 $this->time_target[
'changeable'] = $a_attribs[
'changeable'];
103 if (isset($a_attribs[
'starting_time'])) {
104 $this->time_target[
'suggestion_start'] = $a_attribs[
'starting_time'];
106 if (isset($a_attribs[
'ending_time'])) {
107 $this->time_target[
'suggestion_end'] = $a_attribs[
'ending_time'];
Exception class for ObjectXMLWriter and ObjectXMLParser.
addProperty(string $a_name, $a_value)
static __extractId(string $ilias_id, int $inst_id)
extract ref id from role title, e.g.
◆ handlerCharacterData()
ilObjectXMLParser::handlerCharacterData |
( |
|
$a_xml_parser, |
|
|
string |
$a_data |
|
) |
| |
- Parameters
-
XMLParser | resource | $a_xml_parser | |
string | $a_data | |
- Returns
- void
Definition at line 163 of file class.ilObjectXMLParser.php.
165 if ($a_data !==
"\n") {
167 $a_data = preg_replace(
"/\t+/",
" ", $a_data);
169 $this->cdata .= $a_data;
◆ handlerEndTag()
ilObjectXMLParser::handlerEndTag |
( |
|
$a_xml_parser, |
|
|
string |
$a_name |
|
) |
| |
- Parameters
-
XMLParser | resource | $a_xml_parser | |
string | $a_name | |
- Returns
- void
Definition at line 119 of file class.ilObjectXMLParser.php.
References addProperty(), and addReference().
131 $this->
addProperty(
'description', trim($this->cdata));
139 $this->
addProperty(
'create_date', trim($this->cdata));
143 $this->
addProperty(
'last_update', trim($this->cdata));
147 $this->
addProperty(
'import_id', trim($this->cdata));
151 $this->
addReference($this->ref_id, $this->parent_id, $this->time_target);
addReference(int $a_ref_id, int $a_parent_id, array $a_time_target)
addProperty(string $a_name, $a_value)
◆ setHandlers()
ilObjectXMLParser::setHandlers |
( |
|
$a_xml_parser | ) |
|
- Parameters
-
XMLParser | resource | $a_xml_parser | |
- Returns
- void
Definition at line 37 of file class.ilObjectXMLParser.php.
39 xml_set_object($a_xml_parser, $this);
40 xml_set_element_handler($a_xml_parser,
'handlerBeginTag',
'handlerEndTag');
41 xml_set_character_data_handler($a_xml_parser,
'handlerCharacterData');
◆ $cdata
string ilObjectXMLParser::$cdata = '' |
|
private |
◆ $curr_obj
int ilObjectXMLParser::$curr_obj = 0 |
|
private |
◆ $object_data
array ilObjectXMLParser::$object_data = [] |
◆ $parent_id
int ilObjectXMLParser::$parent_id = 0 |
|
private |
◆ $ref_id
int ilObjectXMLParser::$ref_id = 0 |
|
private |
◆ $time_target
array ilObjectXMLParser::$time_target = [] |
|
private |
The documentation for this class was generated from the following file: