Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
39 | public function add($uri, $msg = self::MSG_DEFAULT, array $vars = null) |
||
40 | { |
||
41 | // save data into database |
||
42 | $record = new UserNotification(); |
||
43 | $record->user_id = $this->_targetId; |
||
44 | $record->uri = $uri; |
||
45 | $record->msg = $msg; |
||
46 | if ($vars !== null) { |
||
47 | $record->vars = Serialize::encode($vars); |
||
48 | } |
||
49 | |||
50 | $record->save(); |
||
51 | } |
||
52 | } |