]> dev.renevier.net Git - syj.git/blob - application/models/User.php
version 0.1
[syj.git] / application / models / User.php
1 <?php
2 /*  This file is part of Syj, Copyright (c) 2010 Arnaud Renevier,
3     and is published under the AGPL license. */
4
5 class Syj_Model_User extends Syj_Model_Generic
6 {
7     protected $_id;
8     protected $_pseudo;
9     protected $_password;
10     protected $_email;
11     protected $_lang;
12     protected $_creation_addr;
13
14     public function setId($id) {
15         $this->_id = (int) $id;
16         return $this;
17     }
18
19     public function getId() {
20         return $this->_id;
21     }
22
23     public function setPassword($password) {
24         $this->_password = (string) $password;
25         return $this;
26     }
27
28     public function getPassword() {
29         return $this->_password;
30     }
31
32     public function setPseudo($pseudo) {
33         $this->_pseudo = (string) $pseudo;
34         return $this;
35     }
36
37     public function getPseudo() {
38         return $this->_pseudo;
39     }
40
41     public function setEmail($email) {
42         $this->_email = (string) $email;
43         return $this;
44     }
45
46     public function getEmail() {
47         return $this->_email;
48     }
49
50     public function setLang($lang) {
51         $this->_lang = (string) $lang;
52         return $this;
53     }
54
55     public function getLang() {
56         return $this->_lang;
57     }
58
59     public function setCreationAddr($creation_addr) {
60         $this->_creation_addr = (string) $creation_addr;
61         return $this;
62     }
63
64     public function getCreationAddr() {
65         return $this->_creation_addr;
66     }
67
68     public function notifyPendings() {
69         $pendingMapper = new Syj_Model_PendingMapper();
70         $pendings = $pendingMapper->fetchForUser($this);
71         foreach ($pendings as $pending) {
72             $pending->notify();
73         }
74     }
75
76 }
77