This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.  
 More...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. 
ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.
If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning 
Definition at line 20 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 203 of file class.ilObjectXMLParser.php.
References $curr_obj.
Referenced by handlerEndTag().
  205         $reference[
'ref_id'] = $a_ref_id;
   206         $reference[
'parent_id'] = $a_parent_id;
   207         $reference[
'time_target'] = $a_time_target;
   209         if (isset($reference[
'time_target'][
'changeable']) && $reference[
'time_target'][
'changeable'] &&
   210             !isset($reference[
'time_target'][
'suggestion_start'], $reference[
'time_target'][
'suggestion_end'])) {
   212                 '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 55 of file class.ilObjectXMLParser.php.
References $curr_obj, ilUtil\__extractId(), addProperty(), and IL_INST_ID.
   65                 $this->
addProperty(
'type', (
string) $a_attribs[
'type']);
    66                 if (array_key_exists(
'obj_id', $a_attribs)) {
    70                             $a_attribs[
"obj_id"] ?? 
'',
    75                 if (isset($a_attribs[
'offline'])) {
    76                     $this->
addProperty(
'offline', $a_attribs[
'offline']);
    92                 $this->time_target = [];
    93                 $this->ref_id = $a_attribs[
"ref_id"] ?? 0;
    94                 $this->parent_id = $a_attribs[
'parent_id'] ?? 0;
    98                 $this->time_target[
'timing_type'] = $a_attribs[
'type'];
   102                 if (isset($a_attribs[
'visibility'])) {
   103                     $this->time_target[
'timing_visibility'] = $a_attribs[
'visibility'];
   105                 if (isset($a_attribs[
'starting_time'])) {
   106                     $this->time_target[
'starting_time'] = $a_attribs[
'starting_time'];
   108                 if (isset($a_attribs[
'ending_time'])) {
   109                     $this->time_target[
'ending_time'] = $a_attribs[
'ending_time'];
   111                 if (isset($a_attribs[
'ending_time']) && isset($a_attribs[
'starting_time'])) {
   113                     if ($a_attribs[
'ending_time'] < $a_attribs[
'starting_time']) {
   120                 $this->time_target[
'changeable'] = $a_attribs[
'changeable'] ?? 
false;
   122                 if (isset($a_attribs[
'starting_time'])) {
   123                     $this->time_target[
'suggestion_start'] = $a_attribs[
'starting_time'];
   125                 if (isset($a_attribs[
'ending_time'])) {
   126                     $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 183 of file class.ilObjectXMLParser.php.
  185         if ($a_data !== 
"\n") {
   187             $a_data = preg_replace(
"/\t+/", 
" ", $a_data);
   189             $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 137 of file class.ilObjectXMLParser.php.
References addProperty(), and addReference().
  149                 $this->
addProperty(
'description', trim($this->cdata));
   157                 $this->
addProperty(
'create_date', trim($this->cdata));
   161                 $this->
addProperty(
'last_update', trim($this->cdata));
   165                 $this->
addProperty(
'import_id', trim($this->cdata));
   169                 if ($this->ref_id !== 0 && $this->parent_id !== 0) {
   170                     $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 45 of file class.ilObjectXMLParser.php.
   47         xml_set_object($a_xml_parser, $this);
    48         xml_set_element_handler($a_xml_parser, 
'handlerBeginTag', 
'handlerEndTag');
    49         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: