. */ Doctrine::autoload('Doctrine_Exception'); /** * Doctrine_Validator_Exception * * @author Konsta Vesterinen * @license LGPL * @package Doctrine */ class Doctrine_Validator_Exception extends Doctrine_Exception implements Countable, IteratorAggregate { /** * @var array $invalid */ private $invalid = array(); /** * @param Doctrine_Validator $validator */ public function __construct(array $invalid) { $this->invalid = $invalid; } public function getInvalidRecords() { return $this->invalid; } public function getIterator() { return new ArrayIterator($this->invalid); } public function count() { return count($this->invalid); } /** * __toString * * @return string */ public function __toString() { return parent::__toString(); } }