add User service
This commit is contained in:
parent
16e8a7acae
commit
a09322d720
|
@ -8,8 +8,31 @@
|
|||
|
||||
namespace Westdc\User;
|
||||
|
||||
use Zend\ServiceManager\ServiceManager;
|
||||
use Zend\ServiceManager\ServiceManagerAwareInterface;
|
||||
use Westdc\EventModel\AbstractEventManager;
|
||||
|
||||
class User extends AbstractEventManager implements ServiceManagerAwareInterface{
|
||||
|
||||
protected $serviceManager;
|
||||
|
||||
private $db;
|
||||
|
||||
public function setServiceManager(ServiceManager $serviceManager)
|
||||
{
|
||||
$this->serviceManager = $serviceManager;
|
||||
|
||||
$this->init();
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
private function init()
|
||||
{
|
||||
$dbService = $this->serviceManager->get('Db');
|
||||
$this->db = $dbService->getPdo();
|
||||
}
|
||||
|
||||
|
||||
class User {
|
||||
|
||||
}
|
Loading…
Reference in New Issue