Пример #1
0
 public static function getInstance()
 {
     if (is_null(self::$_instance)) {
         self::$_instance = new self();
         self::$_instance->_table = 'admin';
     }
     return self::$_instance;
 }
Пример #2
0
 public function add(Application_Model_Entity_Signup $signUp)
 {
     $role = 'guest';
     if ($signUp->isValidated()) {
         $role = 'user';
     }
     $this->_db->insert($this->_table, ['firstName' => $signUp->getFirstName(), 'lastName' => $signUp->getLastName(), 'email' => $signUp->getEmail(), 'password' => $signUp->getPassword(), 'role' => $role, 'feaderVersion' => Application_Model_AdminRepository::getInstance()->get('feaderVersion'), 'termVersion' => Application_Model_AdminRepository::getInstance()->get('termsVersion'), 'privacyVersion' => Application_Model_AdminRepository::getInstance()->get('privacyVersion'), 'date' => $signUp->getDate()]);
     return $this->_db->lastInsertId($this->_table);
 }