<commit_before><?
defined('C5_EXECUTE') or die("Access Denied.");
class Concrete5_Model_PermissionAccessEntityType extends Object {

	public function getAccessEntityTypeID() {return $this->petID;}
	public function getAccessEntityTypeHandle() {return $this->petHandle;}
	public function getAccessEntityTypeName() {return $this->petName;}
	public function getAccessEntityTypeClass() {
		$class = Loader::helper('text')->camelcase($this->petHandle) . 'PermissionAccessEntity';
		return $class;
	}

	/** Returns the display name for this attribute (localized and escaped accordingly to $format)
	* @param string $format = 'html'
	*	Escape the result in html format (if $format is 'html') or in JavaScript format (if $format is 'js').
	*	If $format is 'text' or any other value, the display name won't be escaped.
	* @return string
	*/
	public function getAccessEntityTypeDisplayName($format = 'html') {
		$value = tc('AttributeKeyName', $this->getAccessEntityTypeName());
		switch($format) {
			case 'html':
				return h($value);
			case 'js':
				return Loader::helper('json')->encode($value);
			case 'text':
			default:
				return $value;
		}
	}

	public static function getByID($petID) {
		$db = Loader::db();
		$row = $db->GetRow('select petID, pkgID, petHandle, petName from PermissionAccessEntityTypes where petID = ?', array($petID));
		if ($row['petHandle']) {
			$wt = new PermissionAccessEntityType();
			$wt->setPropertiesFromArray($row);
			return $wt;
		}
	}<commit_msg>Fixed wrong translation context<commit_after><?
defined('C5_EXECUTE') or die("Access Denied.");
class Concrete5_Model_PermissionAccessEntityType extends Object {

	public function getAccessEntityTypeID() {return $this->petID;}
	public function getAccessEntityTypeHandle() {return $this->petHandle;}
	public function getAccessEntityTypeName() {return $this->petName;}
	public function getAccessEntityTypeClass() {
		$class = Loader::helper('text')->camelcase($this->petHandle) . 'PermissionAccessEntity';
		return $class;
	}

	/** Returns the display name for this access entity type (localized and escaped accordingly to $format)
	* @param string $format = 'html'
	*	Escape the result in html format (if $format is 'html') or in JavaScript format (if $format is 'js').
	*	If $format is 'text' or any other value, the display name won't be escaped.
	* @return string
	*/
	public function getAccessEntityTypeDisplayName($format = 'html') {
		$value = tc('PermissionAccessEntityTypeName', $this->getAccessEntityTypeName());
		switch($format) {
			case 'html':
				return h($value);
			case 'js':
				return Loader::helper('json')->encode($value);
			case 'text':
			default:
				return $value;
		}
	}

	public static function getByID($petID) {
		$db = Loader::db();
		$row = $db->GetRow('select petID, pkgID, petHandle, petName from PermissionAccessEntityTypes where petID = ?', array($petID));
		if ($row['petHandle']) {
			$wt = new PermissionAccessEntityType();
			$wt->setPropertiesFromArray($row);
			return $wt;
		}
	}
{'fraction_non_alphanumeric': 0.13862045984671775, 'fraction_numerical': 0.0013328890369876708, 'mean_word_length': 5.202479338842975, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 21, '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': '1085248', 'n_tokens_mistral': 970, 'n_tokens_neox': 894, 'n_words': 263}