* @license http://github.com/basdenooijer/solarium/raw/master/COPYING * @link http://www.solarium-project.org/ * * @package Solarium * @subpackage Result */ /** * Analysis list result * * @package Solarium * @subpackage Result */ class Solarium_Result_Analysis_List implements IteratorAggregate, Countable { /** * List name * * @var string */ protected $_name; /** * List items * * @var array */ protected $_items; /** * Constructor * * @param string $name * @param array $items */ public function __construct($name, $items) { $this->_name = $name; $this->_items = $items; } /** * Get type value * * @return string */ public function getName() { return $this->_name; } /** * Get all items * * @return array */ public function getItems() { return $this->_items; } /** * IteratorAggregate implementation * * @return ArrayIterator */ public function getIterator() { return new ArrayIterator($this->_items); } /** * Countable implementation * * @return int */ public function count() { return count($this->_items); } }