* @license http://github.com/basdenooijer/solarium/raw/master/COPYING * @link http://www.solarium-project.org/ * * @package Solarium * @subpackage Result */ /** * Select component debug document result * * @package Solarium * @subpackage Result */ class Solarium_Result_Select_Debug_Document extends Solarium_Result_Select_Debug_Detail implements IteratorAggregate, Countable { /** * Key * * @var string */ protected $_key; /** * Details * * @var array */ protected $_details; /** * Constructor * * @param string $key * @param boolean $match * @param float $value * @param string $description * @param array $details */ public function __construct($key, $match, $value, $description, $details) { parent::__construct($match, $value, $description); $this->_key = $key; $this->_details = $details; } /** * Get key value for this document * * @return string */ public function getKey() { return $this->_key; } /** * Get details * * @return array */ public function getDetails() { return $this->_details; } /** * IteratorAggregate implementation * * @return ArrayIterator */ public function getIterator() { return new ArrayIterator($this->_details); } /** * Countable implementation * * @return int */ public function count() { return count($this->_details); } }