From 20cfe16b12ddeefa747d8522b851dac8991f8aa4 Mon Sep 17 00:00:00 2001 From: eddiejaoude Date: Sat, 31 Aug 2013 10:16:27 +0100 Subject: [PATCH] Removed _ for protected property in data mapper --- DataMapper/UserMapper.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/DataMapper/UserMapper.php b/DataMapper/UserMapper.php index ce9fbea..c7ee69f 100644 --- a/DataMapper/UserMapper.php +++ b/DataMapper/UserMapper.php @@ -29,11 +29,11 @@ class UserMapper /** * @var DBAL */ - protected $_adapter; + protected $adapter; public function __construct(DBAL $dbLayer) { - $this->_adapter = $dbLayer; + $this->adapter = $dbLayer; } /** @@ -54,10 +54,10 @@ class UserMapper /* if no ID specified create new user else update the one in the Database */ if (null === ($id = $user->getUserId())) { unset($data['userid']); - $this->_adapter->insert($data); + $this->adapter->insert($data); return true; } else { - $this->_adapter->update($data, array('userid = ?' => $id)); + $this->adapter->update($data, array('userid = ?' => $id)); return true; } } @@ -72,7 +72,7 @@ class UserMapper */ public function findById($id) { - $result = $this->_adapter->find($id); + $result = $this->adapter->find($id); if (0 == count($result)) { throw new \InvalidArgumentException("User #$id not found"); } @@ -89,7 +89,7 @@ class UserMapper */ public function findAll() { - $resultSet = $this->_adapter->findAll(); + $resultSet = $this->adapter->findAll(); $entries = array(); foreach ($resultSet as $row) {