<?php
namespace SabaiApps\Framework\Criteria;

/**
 * Abstract base class for array-based criteria.
 * Stores a field name and an array of values for use in criteria evaluation.
 */
abstract class AbstractArrayCriteria extends AbstractCriteria {

	/**
	 * @var string The field name to apply the criteria to.
	 */
	private $_field;

	/**
	 * @var array The array of values for the criteria.
	 */
	private $_array;

	/**
	 * Constructor.
	 *
	 * @param string $field The field name.
	 * @param array  $array The array of values.
	 */
	public function __construct( $field, array $array ) {
		$this->_field = $field;
		$this->_array = $array;
	}

	/**
	 * Gets the field name.
	 *
	 * @return string
	 */
	public function getField() {
		return $this->_field;
	}

	/**
	 * Gets the array of values.
	 *
	 * @return array
	 */
	public function getArray() {
		return $this->_array;
	}
}
