]> git.mxchange.org Git - quix0rs-gnu-social.git/blob - _darcs/pristine/classes/Fave.php
replace all tabs with four spaces
[quix0rs-gnu-social.git] / _darcs / pristine / classes / Fave.php
1 <?php
2 /**
3  * Table Definition for fave
4  */
5 require_once INSTALLDIR.'/classes/Memcached_DataObject.php';
6
7 class Fave extends Memcached_DataObject 
8 {
9     ###START_AUTOCODE
10     /* the code below is auto generated do not remove the above tag */
11
12     public $__table = 'fave';                            // table name
13     public $notice_id;                       // int(4)  primary_key not_null
14     public $user_id;                         // int(4)  primary_key not_null
15     public $modified;                        // timestamp()   not_null default_CURRENT_TIMESTAMP
16
17     /* Static get */
18     function staticGet($k,$v=NULL) { return Memcached_DataObject::staticGet('Fave',$k,$v); }
19
20     /* the code above is auto generated do not remove the tag below */
21     ###END_AUTOCODE
22
23     static function addNew($user, $notice) {
24         $fave = new Fave();
25         $fave->user_id = $user->id;
26         $fave->notice_id = $notice->id;
27         if (!$fave->insert()) {
28             common_log_db_error($fave, 'INSERT', __FILE__);
29             return false;
30         }
31         return $fave;
32     }
33     
34     function &pkeyGet($kv) {
35         return Memcached_DataObject::pkeyGet('Fave', $kv);
36     }
37 }