diff --git a/lib/Doctrine/Reporter.php b/lib/Doctrine/Reporter.php new file mode 100644 index 000000000..93dcede7d --- /dev/null +++ b/lib/Doctrine/Reporter.php @@ -0,0 +1,48 @@ +. + */ + +/** + * Doctrine_Reporter + * + * @package Doctrine + * @author Konsta Vesterinen + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @category Object Relational Mapping + * @link www.phpdoctrine.com + * @since 1.0 + * @version $Revision$ + */ +class Doctrine_Reporter implements IteratorAggregate { + protected $messages = array(); + + public function add($code, $message) { + $this->messages[] = array($code, $message); + } + public function pop() { + return array_pop($this->messages); + } + public function getAll() { + return $this->messages; + } + public function getIterator() { + return new ArrayIterator($this->messages); + } +}