From: Jan Schneider Date: Fri, 28 Aug 2009 21:08:31 +0000 (+0200) Subject: Implement Countable. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=d0396d8d495ed66fa088ae490a1d0ff3dbe16de9;p=horde.git Implement Countable. --- diff --git a/framework/Db/lib/Horde/Db/Adapter/Abstract.php b/framework/Db/lib/Horde/Db/Adapter/Abstract.php index 9bcea3927..9e056084c 100644 --- a/framework/Db/lib/Horde/Db/Adapter/Abstract.php +++ b/framework/Db/lib/Horde/Db/Adapter/Abstract.php @@ -21,7 +21,7 @@ * @package Horde_Db * @subpackage Adapter */ -abstract class Horde_Db_Adapter_Abstract +abstract class Horde_Db_Adapter_Abstract implements Countable { /** * Config options @@ -472,6 +472,16 @@ abstract class Horde_Db_Adapter_Abstract } /** + * Returns the number of affected or returned rows of the last query. + * + * @return integer + */ + public function count() + { + return $this->_rowCount; + } + + /** * Check if a transaction has been started */ public function transactionStarted()