From d30d8b91d6482362041764fd2dbc3cce5a9b0b87 Mon Sep 17 00:00:00 2001 From: Foaly* Date: Mon, 17 Dec 2012 04:26:58 +0000 Subject: [PATCH] Commonly method --- src/ZfcBase/Mapper/AbstractDbMapper.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/ZfcBase/Mapper/AbstractDbMapper.php b/src/ZfcBase/Mapper/AbstractDbMapper.php index 2c8b36c..2f60617 100644 --- a/src/ZfcBase/Mapper/AbstractDbMapper.php +++ b/src/ZfcBase/Mapper/AbstractDbMapper.php @@ -119,6 +119,19 @@ protected function select(Select $select, $entityPrototype = null, HydratorInter return $resultSet; } + /** + * @return array + */ + public function getAll() + { + $dbresult = $this->select($this->getSelect()); + $result = array(); + while($dbresult && $entity = $dbresult->current()) { + $result[] = $entity; + } + return $result; + } + /** * @param object|array $entity * @param string|TableIdentifier|null $tableName