diff --git a/module/VuFind/src/VuFind/Session/AbstractBase.php b/module/VuFind/src/VuFind/Session/AbstractBase.php index aa9b258706d20c09f87d0f09598679892ed57633..9603b4c77962d901ecaa54d2d0b7892f1072309e 100644 --- a/module/VuFind/src/VuFind/Session/AbstractBase.php +++ b/module/VuFind/src/VuFind/Session/AbstractBase.php @@ -40,7 +40,9 @@ use Zend\Session\SaveHandler\SaveHandlerInterface; abstract class AbstractBase implements SaveHandlerInterface, \VuFind\Db\Table\DbTableAwareInterface { - use \VuFind\Db\Table\DbTableAwareTrait; + use \VuFind\Db\Table\DbTableAwareTrait { + getDbTable as getTable; + } /** * Session lifetime in seconds @@ -139,16 +141,4 @@ abstract class AbstractBase implements SaveHandlerInterface, // is called by the garbage collector and everything is good. // Something to keep in mind though. } - - /** - * Get a database table object. - * - * @param string $table Name of table to retrieve - * - * @return \VuFind\Db\Table\Gateway - */ - protected function getTable($table) - { - return $this->getDbTableManager()->get($table); - } } \ No newline at end of file diff --git a/module/VuFind/src/VuFind/Statistics/Driver/Db.php b/module/VuFind/src/VuFind/Statistics/Driver/Db.php index ea702c05ff199fe22e41c9cac5d47dd97692c2d0..c06e0b0766e7e8892adedebbf28f8b002a4321bf 100644 --- a/module/VuFind/src/VuFind/Statistics/Driver/Db.php +++ b/module/VuFind/src/VuFind/Statistics/Driver/Db.php @@ -57,7 +57,7 @@ class Db extends AbstractBase implements \VuFind\Db\Table\DbTableAwareInterface // Make sure the browser version is a legal length. $userData['browserVersion'] = substr($userData['browserVersion'], 0, 8); - $this->getTable('UserStatsFields')->save($data, $userData); + $this->getDbTable('UserStatsFields')->save($data, $userData); } /** @@ -71,7 +71,7 @@ class Db extends AbstractBase implements \VuFind\Db\Table\DbTableAwareInterface public function getFullList($field, $value = array()) { // Use the model - return $this->getTable('UserStatsFields')->getFields($field, $value) + return $this->getDbTable('UserStatsFields')->getFields($field, $value) ->toArray(); } @@ -85,19 +85,7 @@ class Db extends AbstractBase implements \VuFind\Db\Table\DbTableAwareInterface */ public function getBrowserStats($version, $limit) { - $userStats = $this->getTable('UserStats'); + $userStats = $this->getDbTable('UserStats'); return $userStats->getBrowserStats($version, $limit); } - - /** - * Get a database table object. - * - * @param string $table Name of table to retrieve - * - * @return \VuFind\Db\Table\Gateway - */ - protected function getTable($table) - { - return $this->getDbTableManager()->get($table); - } }