<commit_before><?php

/**
 * Copyright © 2012-2015 by <NAME> (<EMAIL>)
 * Distributed under the terms of the MIT License, see LICENSE
 */

/**
 *
 * @package Core
 */
namespace NoreSources;

/**
 * Do not allow to add new keys
 *
 * @var integer
 */
const kSettingTableRestrictKeys = 0x1;

/**
 * Do not allow to change any value
 *
 * @var integer
 */
const kSettingTableReadOnly = 0x3;

/**
 * Do not raise exception on set/get error
 *
 * @var integer
 */
const kSettingTableSilent = 0x4;
const kSettingTableFileAuto = 0;
const kSettingTableFilePHP = 1;
const kSettingTableFileJSON = 2;

/**
 * Remove all existing entries, then load all elements of the file
 *
 * @var integer
 */
const kSettingTableLoadReplace = 1;

/**
 * Don't override existing entries
 *
 * @var integer
 */
const kSettingTableLoadAppend = 2;

/**
 * Merge existing entries with the one in the file
 *
 * @var integer
 */
const kSettingTableLoadMerge = 2;

class SettingTable implements \ArrayAccess, \Serializable, \IteratorAggregate, \Countable
{

	public function __construct()
	{
		$this->m_elements = new \ArrayObject(array ());
		$this->m_flags = 0;
	}

	public function __toString()
	{
		return $this->serialize();
	}

	/**
	 * Equivalent of offsetGet
	 *
	 * @param unknown $key Key
	 */
	public function __get($key)<commit_msg>accept array as argument of SettingTable constructor<commit_after><?php

/**
 * Copyright © 2012-2015 by <NAME> (<EMAIL>)
 * Distributed under the terms of the MIT License, see LICENSE
 */

/**
 *
 * @package Core
 */
namespace NoreSources;

/**
 * Do not allow to add new keys
 *
 * @var integer
 */
const kSettingTableRestrictKeys = 0x1;

/**
 * Do not allow to change any value
 *
 * @var integer
 */
const kSettingTableReadOnly = 0x3;

/**
 * Do not raise exception on set/get error
 *
 * @var integer
 */
const kSettingTableSilent = 0x4;
const kSettingTableFileAuto = 0;
const kSettingTableFilePHP = 1;
const kSettingTableFileJSON = 2;

/**
 * Remove all existing entries, then load all elements of the file
 *
 * @var integer
 */
const kSettingTableLoadReplace = 1;

/**
 * Don't override existing entries
 *
 * @var integer
 */
const kSettingTableLoadAppend = 2;

/**
 * Merge existing entries with the one in the file
 *
 * @var integer
 */
const kSettingTableLoadMerge = 2;

class SettingTable implements \ArrayAccess, \Serializable, \IteratorAggregate, \Countable
{

	public function __construct($data = array())
	{
		$this->m_elements = new \ArrayObject(\is_array ($data) ? $data: array ());
		$this->m_flags = 0;
	}

	public function __toString()
	{
		return $this->serialize();
	}

	/**
	 * Equivalent of offsetGet
	 *
	 * @param unknown $key Key
	 */
	public function __get($key)
{'fraction_non_alphanumeric': 0.11866913123844731, 'fraction_numerical': 0.015526802218114602, 'mean_word_length': 3.6177474402730376, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 13, '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': '3168138', 'n_tokens_mistral': 896, 'n_tokens_neox': 840, 'n_words': 279}