Guest User

Untitled

a guest
Oct 17th, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. public function serialize() {
  2. $data = array(
  3. 'id' => $this->id,
  4. 'userName' => $this->userName,
  5. 'email' => $this->email,
  6. 'password' => $this->password,
  7. 'name' => $this->name,
  8. 'firstName' => $this->firstName,
  9. );
  10. }
  11.  
  12. public function unserialize($serialized)
  13. {
  14. $data = unserialize($serialized);
  15. $this->id = $data['id'];
  16. $this->userName = $data['userName'];
  17. $this->email = $data['email'];
  18. $this->password = $data['password'];
  19. $this->name = $data['name'];
  20. $this->firstName = $data['firstName'];
  21. }
Add Comment
Please, Sign In to add comment