<commit_before><?php
abstract class WpExhibitModel {
	protected $fields = array(); /* This should be overridden by the child class */	
	abstract function getTableName();
	abstract function getFormPrefix();
	abstract function getLinkCaption();
    abstract function getEditInfo();
    
 	function WpExhibitModel($opts = NULL) {
 		$this->id = NULL;
		
		if (isset($opts['formid'])) {
			$formid = $opts['formid'];
			WpExhibitModel::loadFromForm($this, $formid);	
		}
	}

	function getId() {
		return $this->id;
	}
	
	function getFields() {
		return $this->fields;
	}
	
	function get($field, $nice=false) {
		if (array_key_exists($field, $this->fields)) {
			return $this->fields[$field];
		}
		else {
			if (! $nice) {
				die("Attempted to get a field that does not exist: $field.");							
			}
		}
	}
	
	function set($field, $value, $nice=false) {
		if (array_key_exists($field, $this->fields)) {
			$this->fields[$field] = $value;
		}
		else {<commit_msg>adding default NULL return when a 'nice' get fails<commit_after><?php
abstract class WpExhibitModel {
	protected $fields = array(); /* This should be overridden by the child class */	
	abstract function getTableName();
	abstract function getFormPrefix();
	abstract function getLinkCaption();
    abstract function getEditInfo();
    
 	function WpExhibitModel($opts = NULL) {
 		$this->id = NULL;
		
		if (isset($opts['formid'])) {
			$formid = $opts['formid'];
			WpExhibitModel::loadFromForm($this, $formid);	
		}
	}

	function getId() {
		return $this->id;
	}
	
	function getFields() {
		return $this->fields;
	}
	
	function get($field, $nice=false) {
		if (array_key_exists($field, $this->fields)) {
			return $this->fields[$field];
		}
		else {
			if (! $nice) {
				die("Attempted to get a field that does not exist: $field.");							
      } else {
        return null;
      }
		}
	}
	
	function set($field, $value, $nice=false) {
		if (array_key_exists($field, $this->fields)) {
			$this->fields[$field] = $value;
		}
		else {
{'fraction_non_alphanumeric': 0.1559679037111334, 'fraction_numerical': 0.0, 'mean_word_length': 3.5444191343963554, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '2330065', 'n_tokens_mistral': 757, 'n_tokens_neox': 664, 'n_words': 165}