]> git.mxchange.org Git - quix0rs-gnu-social.git/blob - plugins/OpenID/User_openid_trustroot.php
Localisation updates from http://translatewiki.net.
[quix0rs-gnu-social.git] / plugins / OpenID / User_openid_trustroot.php
1 <?php
2 /**
3  * Table Definition for user_openid_trustroot
4  */
5
6 if (!defined('STATUSNET')) {
7     exit(1);
8 }
9
10 class User_openid_trustroot extends Memcached_DataObject
11 {
12     ###START_AUTOCODE
13     /* the code below is auto generated do not remove the above tag */
14
15     public $__table = 'user_openid_trustroot';                     // table name
16     public $trustroot;                         // varchar(255) primary_key not_null
17     public $user_id;                         // int(4)  primary_key not_null
18     public $created;                         // datetime()   not_null
19     public $modified;                        // timestamp()   not_null default_CURRENT_TIMESTAMP
20
21     /* Static get */
22     function staticGet($k,$v=null)
23     { return Memcached_DataObject::staticGet('User_openid_trustroot',$k,$v); }
24
25     /* the code above is auto generated do not remove the tag below */
26     ###END_AUTOCODE
27
28     function pkeyGet($kv)
29     {
30         return Memcached_DataObject::pkeyGet('User_openid_trustroot', $kv);
31     }
32
33     function table()
34     {
35         $db = $this->getDatabaseConnection();
36         $dbtype = $db->phptype; // Database type is stored here. Crazy but true.
37
38         return array('trustroot' => DB_DATAOBJECT_STR + DB_DATAOBJECT_NOTNULL,
39                      'user_id'   => DB_DATAOBJECT_INT + DB_DATAOBJECT_NOTNULL,
40                      'created'   => DB_DATAOBJECT_STR + DB_DATAOBJECT_DATE + DB_DATAOBJECT_TIME + DB_DATAOBJECT_NOTNULL,
41                      'modified'  => ($dbtype == 'mysql' || $dbtype == 'mysqli') ?
42                      DB_DATAOBJECT_MYSQLTIMESTAMP + DB_DATAOBJECT_NOTNULL :
43                      DB_DATAOBJECT_STR + DB_DATAOBJECT_DATE + DB_DATAOBJECT_TIME
44                      );
45     }
46
47     function keys()
48     {
49         return array_keys($this->keyTypes());
50     }
51
52     function keyTypes()
53     {
54         return array('trustroot' => 'K', 'user_id' => 'K');
55     }
56 }