<commit_before><?php
/**
 * Reefknot framework
 * 
 * @copyright Gordian Solutions and <NAME>
 * @license http://www.apache.org/licenses/LICENSE-2.0.txt Apache license V2.0
 */

namespace gordian\reefknot\input\validate\iface;

/**
 *
 * @author gordonmcvey
 */
interface DataSet extends Node
{
	/**
	 * Add a field to the validation rules
	 * 
	 * @param string $name The name of the field to be validated (the array key)
	 * @param Node $field (The field rules to be applied)
	 * @return DataSet
	 * @throws \InvalidArgumentException
	 */
	public function addField ($name, Node $field);
	
	/**
	 * Remove a field from the validation rules
	 * 
	 * @param string $name
	 * @return DataSet
	 */
	public function deleteField ($name);
	
	/**
	 * Get list of fields for the data set
	 * 
	 * @return array
	 */
	public function getFields ();
	
	/**
	 * Get named field
	 * 
	 * @param string $name
	 * @return Field
	 */
	public function getField ($name);
}<commit_msg>Began work on implementing global validation rules in DataSet<commit_after><?php
/**
 * Reefknot framework
 * 
 * @copyright Gordian Solutions and Gordon McVey
 * @license http://www.apache.org/licenses/LICENSE-2.0.txt Apache license V2.0
 */

namespace gordian\reefknot\input\validate\iface;

/**
 *
 * @author gordonmcvey
 */
interface DataSet extends Node
{
	/**
	 * Add a field to the validation rules
	 * 
	 * @param string $name The name of the field to be validated (the array key)
	 * @param Node $field (The field rules to be applied)
	 * @return DataSet
	 * @throws \InvalidArgumentException
	 */
	public function addField ($name, Node $field);
	
	/**
	 * Remove a field from the validation rules
	 * 
	 * @param string $name
	 * @return DataSet
	 */
	public function deleteField ($name);
	
	/**
	 * Get list of fields for the data set
	 * 
	 * @return array
	 */
	public function getFields ();
	
	/**
	 * Get named field
	 * 
	 * @param string $name
	 * @return Field
	 */
	public function getField ($name);
	
	/**
	 * Add a global property
	 * 
	 * Global properties allow the same validation rule to be applied to all 
	 * fields within the DataSet.  This is useful when you are expecting your 
	 * data to all be of a uniform format. 
	 * 
	 * @param Prop $prop 
	 * @return DataSet
	 */
	public function addGlobalProp (Prop $newProp);
	
	public function deleteGlobalProp ($propName);
	
	/**
	 * Get the global preperties
	 * 
	 * @return array 
	 */
	public function getGlobalProps ();
}
{'fraction_non_alphanumeric': 0.1085899513776337, 'fraction_numerical': 0.0032414910858995136, 'mean_word_length': 3.0409165302782326, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '2864650', 'n_tokens_mistral': 791, 'n_tokens_neox': 697, 'n_words': 272}