* @license http://github.com/basdenooijer/solarium/raw/master/COPYING * @link http://www.solarium-project.org/ * * @package Solarium * @subpackage Result */ /** * Select field facet result * * A field facet will usually return a dataset of multiple rows, in each row a * value and it's count. You can access the values as an array using * {@link getValues()} or iterate this object. * * @package Solarium * @subpackage Result */ class Solarium_Result_Select_Facet_Field implements IteratorAggregate, Countable { /** * Value array * * @var array */ protected $_values; /** * Constructor * * @param array $values * @return void */ public function __construct($values) { $this->_values = $values; } /** * Get all values * * @return array */ public function getValues() { return $this->_values; } /** * IteratorAggregate implementation * * @return ArrayIterator */ public function getIterator() { return new ArrayIterator($this->_values); } /** * Countable implementation * * @return int */ public function count() { return count($this->_values); } }