<commit_before><?php
/**
 * Class following Singleton pattern for specific extension configuration
 * as far as the default Case Relations are concerned for PUM
 *
 * @author <NAME> (CiviCooP) <<EMAIL>>
 */
class CRM_Oppgavexml_Config {
  /*
   * singleton pattern
   */
  static private $_singleton = NULL;
  /*
   * property to hold the name of the folder where the exported xml file is put
   */
  protected $_xml_file_path = null;
  /*
   * property to hold the maximum amount deductible per contact
   */
  protected $_max_deductible_amount = null;
  /*
   * property to hold the minimum amount deductible per contact
   */
  protected $_min_deductible_amount = null;
  /*
   * property to hold the tax declaration file status
   */
  protected $_tax_declaration_status = array();
  /*
   * property for custom group and custom fields for personsnummer and organisasjonsnummer
   */
  protected $_contact_custom_group_table = null;
  protected $_personsnummer_custom_field_column = null;
  protected $_organisasjonsnummer_custom_field_column = null;
  /*
   * properties to hold the information about the sending organisation
   * and the file type
   */
  protected $_sender_kilde_system = null;
  protected $_sender_organisasjonsnummer = null;
  protected $_sender_organisasjonsnavn = null;
  protected $_sender_kontakt_navn = null;
  protected $_sender_kontakt_telefon = null;
  protected $_sender_kontakt_epost = null;
  protected $_sender_kontakt_mobil = null;
  protected $_leveranse_type = null;
  /*
   * properties about the xml file and
   */
  protected $_xml_version = null;
  protected $_xml_encoding = null;
  protected $_melding_xmlns = null;
  protected $_melding_xmlns_xsi = null;
  protected $_melding_xsi_schema_location = null;
  /**
   * Constructor
   */
  function __construct() {
    $this->set_xml_file_path(); 
    $this->set_max_deductible_amount();
    $this->set_min_deductible_amount();
    $this->set_sender_info();
    $this->set_xml_headers();
    $this->set_custom_data();
  }
  /**
   * Function to return the custom group table name for the maf_norway_import custom group
   * 
   * @return int
   * @access public
   */
  public function get_contact_custom_group_table() {
    return $this->_contact_custom_group_table;
  }
  /**
   * Function to return the custom field column for personsnummer
   * 
   * @return int
   * @access public
   */
  public function get_personsnummer_custom_field_column() {
    return $this->_personsnummer_custom_field_column;
  }
  /**
   * Function to return the custom field column for organisasjonsnummer
   * 
   * @return int
   * @access public
   */
  public function get_organisasjonsnummer_custom_field_column() {
    return $this->_organisasjonsnummer_custom_field_column;
  }
  /**
   * Function to return the sender kilde system
   * 
   * @return string
   * @access public
   */
  public function get_sender_kilde_system() {
    return $this->_sender_kilde_system;
  }
  /**
   * Function to return the sender organisasjonsnummer
   * (organisation number)
   * 
   * @return string
   * @access public
   */
  public function get_sender_organisasjonsnummer() {
    return $this->_sender_organisasjonsnummer;
  }
  /**
   * Function to return the sender organisasjonsnavn 
   * (organisation name)
   * 
   * @return string
   * @access public
   */
  public function get_sender_organisasjonsnavn() {
    return $this->_sender_organisasjonsnavn;
  }
  /**
   * Function to return the sender kontakt navn
   * (contactperson name)
   * 
   * @return string
   * @access public
   */
  public function get_sender_kontakt_navn() {
    return $this->_sender_kontakt_navn;
  }
  /**
   * Function to return the sender kontakt telefon
   * (contactperson phone)
   * 
   * @return string
   * @access public
   */
  public function get_sender_kontakt_telefon() {
    return $this->_sender_kontakt_telefon;
  }
  /**
   * Function to return the sender kontakt epost
   * (contactperson email)
   * 
   * @return string
   * @access public
   */
  public function get_sender_kontakt_epost() {
    return $this->_sender_kontakt_epost;
  }
  /**
   * Function to return the sender kontakt mobil
   * (contactperson mobile)
   * 
   * @return string
   * @access public
   */
  public function get_sender_kontakt_mobil() {
    return $this->_sender_kontakt_mobil;
  }
  /**
   * Function to return the leveranse type
   * (file supplier type)
   * 
   * @return string
   * @access public
   */
  public function get_leveranse_type() {
    return $this->_leveranse_type;
  }
  /**
   * Function to return xml version for the xml file
   * 
   * @return string
   * @access public
   */
  public function get_xml_version() {
    return $this->_xml_version;
  }
  /**
   * Function to return the xml encoding for the xml file
   * 
   * @return string
   * @access public
   */
  public function get_xml_encoding() {
    return $this->_xml_encoding;
  }
  /**
   * Function to return the xmlns for the xml file
   * 
   * @return string
   * @access public
   */
  public function get_melding_xmlns() {
    return $this->_melding_xmlns;
  }
  /**
   * Function to return the xmlns:xsi for the xml file
   * 
   * @return string
   * @access public
   */
  public function get_melding_xmlns_xsi() {
    return $this->_melding_xmlns_xsi;
  }
  /**
   * Function to return the xsi:schemaLocation for the xml file
   * 
   * @return string
   * @access public
   */
  public function get_melding_xsi_schema_location() {
    return $this->_melding_xsi_schema_location;
  }
  /**
   * Function returns min deductible amount
   * 
   * @return int
   * @access public
   */
 public function get_min_deductible_amount() {
   return $this->_min_deductible_amount;
 }
  /**
   * Function returns max deductible amount
   * 
   * @return int
   * @access public
   */
  public function get_max_deductible_amount() {
    return $this->_max_deductible_amount;
  }
  /**
   * Function returns path for storing xml file
   * 
   * @return string
   * @access public
   */
  public function get_xml_file_path() {
    return $this->_xml_file_path;
  }
  /**
   * Function to return singleton object
   * 
   * @return object $_singleton
   * @access public
   * @static
   */
  public static function &singleton() {
    if (self::$_singleton === NULL) {
      self::$_singleton = new CRM_Oppgavexml_Config();
    }
    return self::$_singleton;
  }
  /**
   * Function to set the path for storign the xml file
   * 
   * @access protected
   */
  protected function set_xml_file_path() {
    $this->_xml_file_path = '/home/maf/taxfiles/';
  }
  /**
   * Function to set the maximum deductible amount
   * Any amount higher than this will be topped to this amount
   * 
   * @access protected
   */
  protected function set_max_deductible_amount() {
    $this->_max_deductible_amount = 16800;
  }
  /**
   * Function to set the minimum deductible amount
   * 
   * @access protected
   */
  protected function set_min_deductible_amount() {
    $this->_min_deductible_amount = 500;
  }
  /**
   * Function to set the sender information for the xml file<commit_msg>comment change in Config<commit_after><?php
/**
 * Class following Singleton pattern for specific extension configuration
 *
 * @author <NAME> (CiviCooP) <<EMAIL>>
 */
class CRM_Oppgavexml_Config {
  /*
   * singleton pattern
   */
  static private $_singleton = NULL;
  /*
   * property to hold the name of the folder where the exported xml file is put
   */
  protected $_xml_file_path = null;
  /*
   * property to hold the maximum amount deductible per contact
   */
  protected $_max_deductible_amount = null;
  /*
   * property to hold the minimum amount deductible per contact
   */
  protected $_min_deductible_amount = null;
  /*
   * property to hold the tax declaration file status
   */
  protected $_tax_declaration_status = array();
  /*
   * property for custom group and custom fields for personsnummer and organisasjonsnummer
   */
  protected $_contact_custom_group_table = null;
  protected $_personsnummer_custom_field_column = null;
  protected $_organisasjonsnummer_custom_field_column = null;
  /*
   * properties to hold the information about the sending organisation
   * and the file type
   */
  protected $_sender_kilde_system = null;
  protected $_sender_organisasjonsnummer = null;
  protected $_sender_organisasjonsnavn = null;
  protected $_sender_kontakt_navn = null;
  protected $_sender_kontakt_telefon = null;
  protected $_sender_kontakt_epost = null;
  protected $_sender_kontakt_mobil = null;
  protected $_leveranse_type = null;
  /*
   * properties about the xml file and
   */
  protected $_xml_version = null;
  protected $_xml_encoding = null;
  protected $_melding_xmlns = null;
  protected $_melding_xmlns_xsi = null;
  protected $_melding_xsi_schema_location = null;
  /**
   * Constructor
   */
  function __construct() {
    $this->set_xml_file_path(); 
    $this->set_max_deductible_amount();
    $this->set_min_deductible_amount();
    $this->set_sender_info();
    $this->set_xml_headers();
    $this->set_custom_data();
  }
  /**
   * Function to return the custom group table name for the maf_norway_import custom group
   * 
   * @return int
   * @access public
   */
  public function get_contact_custom_group_table() {
    return $this->_contact_custom_group_table;
  }
  /**
   * Function to return the custom field column for personsnummer
   * 
   * @return int
   * @access public
   */
  public function get_personsnummer_custom_field_column() {
    return $this->_personsnummer_custom_field_column;
  }
  /**
   * Function to return the custom field column for organisasjonsnummer
   * 
   * @return int
   * @access public
   */
  public function get_organisasjonsnummer_custom_field_column() {
    return $this->_organisasjonsnummer_custom_field_column;
  }
  /**
   * Function to return the sender kilde system
   * 
   * @return string
   * @access public
   */
  public function get_sender_kilde_system() {
    return $this->_sender_kilde_system;
  }
  /**
   * Function to return the sender organisasjonsnummer
   * (organisation number)
   * 
   * @return string
   * @access public
   */
  public function get_sender_organisasjonsnummer() {
    return $this->_sender_organisasjonsnummer;
  }
  /**
   * Function to return the sender organisasjonsnavn 
   * (organisation name)
   * 
   * @return string
   * @access public
   */
  public function get_sender_organisasjonsnavn() {
    return $this->_sender_organisasjonsnavn;
  }
  /**
   * Function to return the sender kontakt navn
   * (contactperson name)
   * 
   * @return string
   * @access public
   */
  public function get_sender_kontakt_navn() {
    return $this->_sender_kontakt_navn;
  }
  /**
   * Function to return the sender kontakt telefon
   * (contactperson phone)
   * 
   * @return string
   * @access public
   */
  public function get_sender_kontakt_telefon() {
    return $this->_sender_kontakt_telefon;
  }
  /**
   * Function to return the sender kontakt epost
   * (contactperson email)
   * 
   * @return string
   * @access public
   */
  public function get_sender_kontakt_epost() {
    return $this->_sender_kontakt_epost;
  }
  /**
   * Function to return the sender kontakt mobil
   * (contactperson mobile)
   * 
   * @return string
   * @access public
   */
  public function get_sender_kontakt_mobil() {
    return $this->_sender_kontakt_mobil;
  }
  /**
   * Function to return the leveranse type
   * (file supplier type)
   * 
   * @return string
   * @access public
   */
  public function get_leveranse_type() {
    return $this->_leveranse_type;
  }
  /**
   * Function to return xml version for the xml file
   * 
   * @return string
   * @access public
   */
  public function get_xml_version() {
    return $this->_xml_version;
  }
  /**
   * Function to return the xml encoding for the xml file
   * 
   * @return string
   * @access public
   */
  public function get_xml_encoding() {
    return $this->_xml_encoding;
  }
  /**
   * Function to return the xmlns for the xml file
   * 
   * @return string
   * @access public
   */
  public function get_melding_xmlns() {
    return $this->_melding_xmlns;
  }
  /**
   * Function to return the xmlns:xsi for the xml file
   * 
   * @return string
   * @access public
   */
  public function get_melding_xmlns_xsi() {
    return $this->_melding_xmlns_xsi;
  }
  /**
   * Function to return the xsi:schemaLocation for the xml file
   * 
   * @return string
   * @access public
   */
  public function get_melding_xsi_schema_location() {
    return $this->_melding_xsi_schema_location;
  }
  /**
   * Function returns min deductible amount
   * 
   * @return int
   * @access public
   */
 public function get_min_deductible_amount() {
   return $this->_min_deductible_amount;
 }
  /**
   * Function returns max deductible amount
   * 
   * @return int
   * @access public
   */
  public function get_max_deductible_amount() {
    return $this->_max_deductible_amount;
  }
  /**
   * Function returns path for storing xml file
   * 
   * @return string
   * @access public
   */
  public function get_xml_file_path() {
    return $this->_xml_file_path;
  }
  /**
   * Function to return singleton object
   * 
   * @return object $_singleton
   * @access public
   * @static
   */
  public static function &singleton() {
    if (self::$_singleton === NULL) {
      self::$_singleton = new CRM_Oppgavexml_Config();
    }
    return self::$_singleton;
  }
  /**
   * Function to set the path for storign the xml file
   * 
   * @access protected
   */
  protected function set_xml_file_path() {
    $this->_xml_file_path = '/home/erik/Documenten/civicoop/maf/taxfiles/';
  }
  /**
   * Function to set the maximum deductible amount
   * Any amount higher than this will be topped to this amount
   * 
   * @access protected
   */
  protected function set_max_deductible_amount() {
    $this->_max_deductible_amount = 16800;
  }
  /**
   * Function to set the minimum deductible amount
   * 
   * @access protected
   */
  protected function set_min_deductible_amount() {
    $this->_min_deductible_amount = 500;
  }
  /**
   * Function to set the sender information for the xml file
{'fraction_non_alphanumeric': 0.09369724254361284, 'fraction_numerical': 0.0011254924029262803, 'mean_word_length': 3.1089595375722543, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 65, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 70}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4520436', 'n_tokens_mistral': 4582, 'n_tokens_neox': 4484, 'n_words': 1179}