diff options
Diffstat (limited to 'lib/public/AppFramework/Db/Mapper.php')
-rw-r--r-- | lib/public/AppFramework/Db/Mapper.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/public/AppFramework/Db/Mapper.php b/lib/public/AppFramework/Db/Mapper.php index 7dcc4a4bade..6d35c99d672 100644 --- a/lib/public/AppFramework/Db/Mapper.php +++ b/lib/public/AppFramework/Db/Mapper.php @@ -49,7 +49,7 @@ abstract class Mapper { * @since 7.0.0 * @deprecated 14.0.0 Move over to QBMapper */ - public function __construct(IDBConnection $db, $tableName, $entityClass=null){ + public function __construct(IDBConnection $db, $tableName, $entityClass=null) { $this->db = $db; $this->tableName = '*PREFIX*' . $tableName; @@ -68,7 +68,7 @@ abstract class Mapper { * @since 7.0.0 * @deprecated 14.0.0 Move over to QBMapper */ - public function getTableName(){ + public function getTableName() { return $this->tableName; } @@ -80,7 +80,7 @@ abstract class Mapper { * @since 7.0.0 - return value added in 8.1.0 * @deprecated 14.0.0 Move over to QBMapper */ - public function delete(Entity $entity){ + public function delete(Entity $entity) { $sql = 'DELETE FROM `' . $this->tableName . '` WHERE `id` = ?'; $stmt = $this->execute($sql, [$entity->getId()]); $stmt->closeCursor(); @@ -95,7 +95,7 @@ abstract class Mapper { * @since 7.0.0 * @deprecated 14.0.0 Move over to QBMapper */ - public function insert(Entity $entity){ + public function insert(Entity $entity) { // get updated fields to save, fields have to be set using a setter to // be saved $properties = $entity->getUpdatedFields(); @@ -145,7 +145,7 @@ abstract class Mapper { * @since 7.0.0 - return value was added in 8.0.0 * @deprecated 14.0.0 Move over to QBMapper */ - public function update(Entity $entity){ + public function update(Entity $entity) { // if entity wasn't changed it makes no sense to run a db query $properties = $entity->getUpdatedFields(); if(count($properties) === 0) { @@ -235,7 +235,7 @@ abstract class Mapper { * @since 7.0.0 * @deprecated 14.0.0 Move over to QBMapper */ - protected function execute($sql, array $params=[], $limit=null, $offset=null){ + protected function execute($sql, array $params=[], $limit=null, $offset=null) { $query = $this->db->prepare($sql, $limit, $offset); if ($this->isAssocArray($params)) { @@ -271,7 +271,7 @@ abstract class Mapper { * @since 7.0.0 * @deprecated 14.0.0 Move over to QBMapper */ - protected function findOneQuery($sql, array $params=[], $limit=null, $offset=null){ + protected function findOneQuery($sql, array $params=[], $limit=null, $offset=null) { $stmt = $this->execute($sql, $params, $limit, $offset); $row = $stmt->fetch(); @@ -367,7 +367,7 @@ abstract class Mapper { * @since 7.0.0 * @deprecated 14.0.0 Move over to QBMapper */ - protected function findEntity($sql, array $params=[], $limit=null, $offset=null){ + protected function findEntity($sql, array $params=[], $limit=null, $offset=null) { return $this->mapRowToEntity($this->findOneQuery($sql, $params, $limit, $offset)); } |