From 18d9c21435744f4d24a5a9a2edf8cf53e8df045d Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Sun, 31 Aug 2014 09:03:11 +0200 Subject: [PATCH] Added TokenService and UserService --- src/Services/TokenService.php | 32 ++++++++++++++++++++++++++++++++ src/Services/UserService.php | 27 +++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 src/Services/TokenService.php create mode 100644 src/Services/UserService.php diff --git a/src/Services/TokenService.php b/src/Services/TokenService.php new file mode 100644 index 00000000..9d53e732 --- /dev/null +++ b/src/Services/TokenService.php @@ -0,0 +1,32 @@ +tokenDao = $tokenDao; + } + + public function getById($tokenId) + { + return $this->tokenDao->getById($tokenId); + } + + public function getByName($tokenName) + { + return $this->tokenDao->getByName($tokenName); + } + + public function deleteByName($tokenName) + { + return $this->tokenDao->deleteByName($tokenName); + } + + public function save($token) + { + return $this->tokenDao->save($token); + } +} diff --git a/src/Services/UserService.php b/src/Services/UserService.php new file mode 100644 index 00000000..f718cd1d --- /dev/null +++ b/src/Services/UserService.php @@ -0,0 +1,27 @@ +userDao = $userDao; + } + + public function getById($userId) + { + return $this->userDao->getById($userId); + } + + public function getByName($userName) + { + return $this->userDao->getByName($userName); + } + + public function save($user) + { + return $this->userDao->save($user); + } +}