From: Tim Otten Date: Thu, 30 Jul 2015 04:21:23 +0000 (-0700) Subject: CRM_Core_DAO::fetchAll X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=63782ba48b697e4079eef1dfa7cf75c705fb3124;p=civicrm-core.git CRM_Core_DAO::fetchAll --- 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 *