From 63782ba48b697e4079eef1dfa7cf75c705fb3124 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Wed, 29 Jul 2015 21:21:23 -0700 Subject: [PATCH] CRM_Core_DAO::fetchAll --- CRM/Core/DAO.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CRM/Core/DAO.php b/CRM/Core/DAO.php index a08600a826..3c5f3294b8 100644 --- a/CRM/Core/DAO.php +++ b/CRM/Core/DAO.php @@ -977,6 +977,19 @@ FROM civicrm_domain return $object; } + /** + * Returns all results as array-encoded records. + * + * @return array + */ + public function fetchAll() { + $result = array(); + while ($this->fetch()) { + $result[] = $this->toArray(); + } + return $result; + } + /** * Given a DAO name, a column name and a column value, find the record and GET the value of another column in that record * -- 2.25.1