You are here

function ARC_erdf_parser::init in Taxonomy import/export via XML 5

Same name and namespace in other branches
  1. 5.2 arc/ARC_erdf_parser.php \ARC_erdf_parser::init()
  2. 6.2 arc/ARC_erdf_parser.php \ARC_erdf_parser::init()
  3. 6 arc/ARC_erdf_parser.php \ARC_erdf_parser::init()
3 calls to ARC_erdf_parser::init()
ARC_erdf_parser::parse_data in arc/ARC_erdf_parser.php
ARC_erdf_parser::parse_file in arc/ARC_erdf_parser.php
ARC_erdf_parser::parse_web_file in arc/ARC_erdf_parser.php

File

arc/ARC_erdf_parser.php, line 44

Class

ARC_erdf_parser

Code

function init($create_parser = true) {
  $this->triples = array();
  $this->nodes = array();
  $this->node_count = 0;
  $this->subjs = array();
  $this->subj_count = 0;
  $this->base = "";
  $this->result_headers = array();
  $this->data = "";
  $this->level = 0;
  $this->is_erdf = false;

  /* base */
  if (isset($this->init_args["base"]) && ($base = $this->init_args["base"])) {
    $this
      ->set_base($base);
  }

  /* subj */
  $this->cur_subj = $this->base;

  /* save_data */
  $this->save_data = isset($this->init_args["save_data"]) ? $this->init_args["save_data"] : false;

  /* encoding */
  $this->encoding = isset($this->init_args["encoding"]) && $this->init_args["encoding"] ? $this->init_args["encoding"] : "UTF-8";

  /* parser */
  if ($create_parser) {
    $this
      ->create_parser();
  }
}