user ser modify

This commit is contained in:
cuixin 2015-01-27 02:42:06 +08:00
parent 9bc2e4e065
commit 60e3d2e97a
2 changed files with 20 additions and 23 deletions

View File

@ -17,8 +17,7 @@ class Group implements ServiceManagerAwareInterface{
private $db;
public function setServiceManager(ServiceManager $serviceManager)
{
public function setServiceManager (ServiceManager $serviceManager) {
$this->serviceManager = $serviceManager;
$this->init();
@ -26,8 +25,7 @@ class Group implements ServiceManagerAwareInterface{
return $this;
}
private function init()
{
private function init () {
$dbService = $this->serviceManager->get('Db');
$this->db = $dbService->getPdo();
}

View File

@ -71,5 +71,4 @@ class User extends AbstractEventManager implements ServiceManagerAwareInterface
return $rs->fetchAll(\PDO::FETCH_ASSOC);
}
}