Guest User

Untitled

a guest
May 23rd, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. 10 class User_Model extends Auth_User_Model
  2. 11 {
  3. 12 //ORM array, many to many related to events, roles, sororities
  4. 13 protected $has_and_belongs_to_many = array('events','roles','sororities');
  5. 14 public function __construct($id = FALSE)
  6. 15 {
  7. 16 parent::__construct($id);
  8. 17 }
  9. 18
  10. 19 public function __get($key)
  11. 20 {
  12. 21 return parent::__get($key);
  13. 22 }
  14. 23
  15. 24 public function __set($key,$value)
  16. 25 {
  17. 26 return parent::__set($key,$value);
  18. 27 }
  19. 28 //when object is destructed save it to the DBMS
  20. 29 //allows the idea of persistant objects
  21. 30 public function __destruct()
  22. 31 {
  23. 32 $this->save();
  24. 33 }
  25. 34
  26. 35
  27. 36 }
Add Comment
Please, Sign In to add comment