* @license http://github.com/basdenooijer/solarium/raw/master/COPYING * @link http://www.solarium-project.org/ * * @package Solarium * @subpackage Result */ /** * Select component grouping query group result * * @since 2.1.0 * * @package Solarium * @subpackage Result */ class Solarium_Result_Select_Grouping_QueryGroup implements IteratorAggregate, Countable { /** * Match count * * @var int */ protected $_matches; /** * NumFound value * * @var int */ protected $_numFound; /** * Start offset * * @var int */ protected $_start; /** * Maximum score in group * * @var float */ protected $_maximumScore; /** * Group documents array * * @var array */ protected $_documents; /** * Constructor * * @param int $matches * @param int $numFound * @param int $start * @param float $maximumScore * @param array $documents * @return void */ public function __construct($matches, $numFound, $start, $maximumScore, $documents) { $this->_matches = $matches; $this->_numFound = $numFound; $this->_start = $start; $this->_maximumScore = $maximumScore; $this->_documents = $documents; } /** * Get matches value * * @return int */ public function getMatches() { return $this->_matches; } /** * Get numFound value * * @return int */ public function getNumFound() { return $this->_numFound; } /** * Get start value * * @return int */ public function getStart() { return $this->_start; } /** * Get maximumScore value * * @return int */ public function getMaximumScore() { return $this->_maximumScore; } /** * Get all documents * * @return array */ public function getDocuments() { return $this->_documents; } /** * IteratorAggregate implementation * * @return ArrayIterator */ public function getIterator() { return new ArrayIterator($this->_documents); } /** * Countable implementation * * @return int */ public function count() { return count($this->_documents); } }