コード例 #1
0
 public function __construct(User $model)
 {
     $this->id = $model->getId();
     $this->fullName = $model->getFullName();
     $this->username = $model->getUsername();
 }
コード例 #2
0
 public function __construct(User $user)
 {
     $this->userId = $user->getId();
     $this->fullName = $user->getFullname();
     $this->username = $user->getUsername();
 }
コード例 #3
0
 private static function update(User $model)
 {
     $db = DatabaseData::getInstance(\RedDevil\Config\DatabaseConfig::DB_INSTANCE);
     $query = "UPDATE users SET username= :username, email= :email, password= :password, fullname= :fullname, telephone= :telephone WHERE id = :id";
     $result = $db->prepare($query);
     $result->execute([':id' => $model->getId(), ':username' => $model->getUsername(), ':email' => $model->getEmail(), ':password' => $model->getPassword(), ':fullname' => $model->getFullname(), ':telephone' => $model->getTelephone()]);
 }